|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30440 Nested entities cause invalid XML
Submitted: 2004-10-15 06:56 UTC Modified: 2005-06-21 04:01 UTC
From: Assigned: iliaa (profile)
Status: Not a bug Package: Livedocs problem
PHP Version: Irrelevant OS: n/a
Private report: No CVE-ID: None
 [2004-10-15 06:56 UTC]
When an entity contains a nested (special character) entity, the handler is not called properly, and this can result in malformed XML.

I worked on this for about 30 mins, tonight, and didn't get very far, so no patch, yet.

Reproduce code:

Expected result:
<ulink url="">

Actual result:
<ulink url="<phpdoc_include ref="amp"/>topic=regex">


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-15 17:44 UTC]
That should be fixed with one of my patches:
 [2004-10-15 17:54 UTC]
Confirmed that this patch fixes this problem.

Could someone with the necessary karma please patch & commit?

 [2005-04-20 20:37 UTC]
I applied the patch and with French doc there are a lot of accents... (? ? ...)
I got only a Warning (the page is displayed but crash only at the special character) :

XML: 1:33 Invalid character Line: 1 is <div><div class="function_link"><function>pg_affected_rows</function> - Retourne le nombre de lignes affect?es</div>

<div><div class="function_link"><function>pg_affected_rows</function> - Retourne le nombre de lignes affect?es</div>
<div class="function_link"><function>pg_cancel_query</function> - Annule une requ?te asynchrone</div>

It seems that it is only for displaying functions at the end of a reference.xml file
Example : fr/ref.pgsql.html
 [2005-06-18 04:03 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

 [2005-06-20 17:19 UTC]
I have still the same errors... Do I have to apply the patch again ?
 [2005-06-21 04:01 UTC]
The parser expects charset of the XML files to be UTF-8, for the French translation it is ISO-8859-1. To solve many of the errors in parsing, modify mkindex.php and change 

This is not a livedocs bug, as the input should technically be UTF-8.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Jan 18 07:01:23 2020 UTC