#48109 [Opn->Bgs]: DOM interpolates specific entities (&apos and ")
| From: | rrichards@php.net | Date: | Wed, 29 Apr 2009 14:33:43 +0000 |
| Subject: | #48109 [Opn->Bgs]: DOM interpolates specific entities (&apos and ") | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-136509@lists.php.net to get a copy of this message | ||
ID: 48109
Updated by: rrichards@php.net
Reported By: robin dot mehner at freak-company dot com
-Status: Open
+Status: Bogus
Bug Type: DOM XML related
Operating System: MacOSX / Debian Linux
PHP Version: 5.2.9
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Handling of those pre-defined entities is dependent upon the XMl parser
and that is how libxml handles them.
Previous Comments:
------------------------------------------------------------------------
[2009-04-29 13:58:03] robin dot mehner at freak-company dot com
phpt for this bug can be found at:
http://friendpaste.com/2jrhQQ0OzJosv243FDwyGe
Hope this helps.
------------------------------------------------------------------------
[2009-04-29 13:55:41] robin dot mehner at freak-company dot com
Description:
------------
DomDocument interpolates the ' and " entities to their values
(' and "). Other entities like > etc. are displayed as is.
Tested with php version 5.2.6 (self-compiled under debian), 5.2.9 and
5.3RC1 on MacOSX. Further version infos can be posted if needed.
Reproduce code:
---------------
<?php
// create document (keep it simple)
$domImp = new DomImplementation();
$dom = $domImp->createDocument(null, 'root');
// create element
$foo = $dom->createElement('foo', '' "'); // bug here
$dom->documentElement->appendChild($foo);
echo $dom->saveXML();
Expected result:
----------------
<?xml version="1.0"?>
<root><foo>' "</foo></root>
Actual result:
--------------
<?xml version="1.0"?>
<root><foo>' "</foo></root>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48109&edit=1