|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30832 "!" stripped off comments
Submitted: 2004-11-18 18:09 UTC Modified: 2004-11-18 19:28 UTC
From: Assigned:
Status: Closed Package: XML related
PHP Version: 5.0.2 OS: Windows 2000
Private report: No CVE-ID: None
 [2004-11-18 18:09 UTC]
ext/xml strips the exclamation marks ("!") off comments

Reproduce code:

$xml = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>
<root><!-- a comment -->bl?</root>";

$xp = xml_parser_create('iso-8859-1');
xml_set_default_handler($xp, 'var_dump');
xml_parse($xp, $xml);


Expected result:
resource(1) of type (xml)
string(17) "<!-- a comment -->"

Actual result:
resource(1) of type (xml)
string(17) "<-- a comment -->"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-18 19:28 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.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 15 18:01:29 2024 UTC