PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » XML » XML_Tree » Bug #4937

getTreeFromString doesn't encode quotes in attributes

Details

Submitted2005-07-28 17:16 UTC
Fromjunkmail at eighteyes dot com
StatusSuspended
PackageXML_Tree
PHP Version4.4.0
OSGentoo 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>