#30875 [Opn->Fbk]: xml_parse_into_struct does not resolve entities in element content
| From: | sniper@php.net | Date: | Thu, 03 Feb 2005 03:41:35 +0000 |
| Subject: | #30875 [Opn->Fbk]: xml_parse_into_struct does not resolve entities in element content | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-73316@lists.php.net to get a copy of this message | ||
ID: 30875
Updated by: sniper@php.net
Reported By: joern_h at gmx dot net
-Status: Open
+Status: Feedback
Bug Type: XML related
Operating System: Windows 2000
PHP Version: 4.3.8
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2004-11-24 00:11:27] joern_h at gmx dot net
Description:
------------
When using xml_parse_into_struct, entities from the internal dtd are
not resolved in element content. Entities in attribute values are
resolved properly. This bug is present in PHP 4.3.8 and PHP5 (cvs from
2004-11-22).
Reproduce code:
---------------
<?php
$xml = <<<HERE
<!DOCTYPE test [
<!ENTITY test "test">
]>
<test>&test;</test>
HERE;
$parser =& xml_parser_create();
xml_parse_into_struct($parser, $xml, $vals, $idx);
print_r($vals);
xml_parser_free($parser);
?>
Expected result:
----------------
Array
(
[0] => Array
(
[tag] => TEST
[type] => complete
[level] => 1
[value] => test
)
)
Actual result:
--------------
Array
(
[0] => Array
(
[tag] => TEST
[type] => complete
[level] => 1
)
)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30875&edit=1