Home » XML » XML_Tree » Bug #4937
getTreeFromString doesn't encode quotes in attributes
Details
| Submitted | 2005-07-28 17:16 UTC |
|---|---|
| From | junkmail at eighteyes dot com |
| Status | Suspended |
| Package | XML_Tree |
| PHP Version | 4.4.0 |
| OS | Gentoo Linux |
| Roadmaps | (Not assigned) |
Comments
[2005-07-28 17:16 UTC] junkmail at eighteyes dot com
Description:
------------
When reading in an xml string, I get errors due to the fact that quotes in attributes are being parsed as ", and not as ".
Test script:
---------------
$xml = <<<END
<?xml version="1.0" ?>
<data>
<folder id="1" summary="This is a "summary"" />
</data>
END;
require_once 'XML/Tree.php';
$tree = new XML_Tree;
$tree->getTreeFromString($xml);
$tree->dump(TRUE);
Expected result:
----------------
The $xml string repeated as is.
Actual result:
--------------
<?xml version="1.0" ?>
<data>
<folder id="1" summary="This is a "summary"" />
</data>