#37878 [Opn->Asn]: Dom Automatically Replaces ASCII Entities Regardless of substituteEntities
| From: | tony2001@php.net | Date: | Thu, 22 Jun 2006 19:32:06 +0000 |
| Subject: | #37878 [Opn->Asn]: Dom Automatically Replaces ASCII Entities Regardless of substituteEntities | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-98683@lists.php.net to get a copy of this message | ||
ID: 37878
Updated by: tony2001@php.net
Reported By: brandenrauch at gmail dot com
-Status: Open
+Status: Assigned
Bug Type: DOM XML related
Operating System: XP
PHP Version: 5.1.4
-Assigned To:
+Assigned To: rrichards
New Comment:
Assigned to the maintainer.
Previous Comments:
------------------------------------------------------------------------
[2006-06-21 20:11:06] brandenrauch at gmail dot com
Description:
------------
For my project my data is passing through both xml and xsl. I've chosen
to use decimal (ascII) entities--ex: "--0for input such as quotes
("), singles quotes ('), less thans (<), greater thans(>), and
ampersands (&).
However, when I load my xml into dom it automatically transforms these
characters into either their natural ascII form (specifically quotes),
or an html entity. These transformations are made regardless of the
substituteEntities boolean setting in the DOMDocument object.
Reproduce code:
---------------
$text =
'<xml><text><tag></text><text>"quotes"</text></xml>';
$dom = new DOMDocument();
$dom->substituteEntities = false;
$dom->loadXML($text);
echo $dom->saveHTML();
Expected result:
----------------
<xml><text><tag></text><text>"quotes"</text></xml>
Actual result:
--------------
<xml><text><tag></text><text>"quotes"</text></xml>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37878&edit=1