#48109 [NEW]: DOM interpolates specific entities (&apos and ")
| From: | robin dot mehner at freak-company dot com | Date: | Wed, 29 Apr 2009 13:55:42 +0000 |
| Subject: | #48109 [NEW]: DOM interpolates specific entities (&apos and ") | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-136504@lists.php.net to get a copy of this message | ||
From: robin dot mehner at freak-company dot com
Operating system: MacOSX / Debian Linux
PHP version: 5.2.9
PHP Bug Type: DOM XML related
Bug description: DOM interpolates specific entities (&apos and ")
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 bug report at http://bugs.php.net/?id=48109&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48109&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48109&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48109&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=48109&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48109&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=48109&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=48109&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=48109&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=48109&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=48109&r=support
Expected behavior: http://bugs.php.net/fix.php?id=48109&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=48109&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=48109&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=48109&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48109&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=48109&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=48109&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=48109&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=48109&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=48109&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=48109&r=mysqlcfg