php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51482 PhD_IDE generates invalid XML
Submitted: 2010-04-05 17:38 UTC Modified: 2010-04-07 04:34 UTC
From: philip@php.net Assigned: moacir (profile)
Status: Closed Package: Doc Build problem
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
 [2010-04-05 17:38 UTC] philip@php.net
Description:
------------
The IDE package generates invalid XML, as it appears to convert entities it 
shouldn't. In this case, &lt to < thus invalidating the XML file.

The following test script is based off the IDE demo.

Test script:
---------------
#!/usr/bin/env php
<?php
use phpdotnet\phd as PhD;

define ('__INSTALLDIR__', '/Users/philip/php/lib/php');
define ('PHD_OUTPUT_DIR', '/Users/philip/svn/php/doc-en/output_dir/');
define('DS',                     DIRECTORY_SEPARATOR);

require __INSTALLDIR__ . DS . 'phpdotnet' . DS . 'phd' . DS . 'Autoloader.php';
require __INSTALLDIR__ . DS . 'phpdotnet' . DS . 'phd' . DS . 'functions.php';

spl_autoload_register(array("phpdotnet\\phd\\Autoloader", "autoload"));

$api = new PhD\Package_IDE_API(PHD_OUTPUT_DIR);

$function = $api->getFunctionByName('strcmp');
print $function->getName();

Expected result:
----------------
strcmp

Actual result:
--------------
[08:25:31 - E_WARNING             ] 
/Users/philip/php/lib/php/phpdotnet/phd/Package/IDE/API.php:94
simplexml_load_file(): /Users/philip/svn/php/doc-en/output_dir/ide-
functions/strcmp.xml:23: parser error : StartTag: invalid element name

[08:25:31 - E_WARNING             ] 
/Users/philip/php/lib/php/phpdotnet/phd/Package/IDE/API.php:94
simplexml_load_file(): <description>Returns < 0 if str1 is less than

...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-04-07 04:31 UTC] moacir@php.net
Automatic comment from SVN on behalf of moacir
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=297600
Log: Fixing bug #51482 - PhD_IDE generates invalid XML
+ Added htmlspecialchars in the return of the readContents() function
 [2010-04-07 04:34 UTC] moacir@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: moacir
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC