php.net |  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: mike@php.net 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] mike@php.net
Description:
------------
ext/xml strips the exclamation marks ("!") off comments

Reproduce code:
---------------
<?php

$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 -->"


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-18 19:28 UTC] rrichards@php.net
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
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Thu Sep 20 20:01:27 2018 UTC