#48109 [Com]: DOM interpolates specific entities (&apos and &quot)

From: Date: Wed, 29 Apr 2009 13:58:03 +0000
Subject: #48109 [Com]: DOM interpolates specific entities (&apos and &quot)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-136505@lists.php.net to get a copy of this message
ID: 48109 Comment by: robin dot mehner at freak-company dot com Reported By: robin dot mehner at freak-company dot com Status: Open Bug Type: DOM XML related Operating System: MacOSX / Debian Linux PHP Version: 5.2.9 New Comment: phpt for this bug can be found at: http://friendpaste.com/2jrhQQ0OzJosv243FDwyGe Hope this helps. Previous Comments: ------------------------------------------------------------------------ [2009-04-29 13:55:41] robin dot mehner at freak-company dot com Description: ------------ DomDocument interpolates the &apos; and &quot; entities to their values (' and "). Other entities like &gt; 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', '&apos; &quot;'); // bug here $dom->documentElement->appendChild($foo); echo $dom->saveXML(); Expected result: ---------------- <?xml version="1.0"?> <root><foo>&apos; &quot;</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

« previous php.bugs (#136505) next »