#30875 [NEW]: xml_parse_into_struct does not resolve entities in element content

From: Date: Tue, 23 Nov 2004 23:11:35 +0000
Subject: #30875 [NEW]: xml_parse_into_struct does not resolve entities in element content
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-69378@lists.php.net to get a copy of this message
From: joern_h at gmx dot net Operating system: Windows 2000 PHP version: 4.3.8 PHP Bug Type: XML related Bug description: xml_parse_into_struct does not resolve entities in element content 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 bug report at http://bugs.php.net/?id=30875&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30875&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30875&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30875&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=30875&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=30875&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30875&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30875&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30875&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30875&r=support Expected behavior: http://bugs.php.net/fix.php?id=30875&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30875&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30875&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=30875&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30875&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=30875&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30875&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30875&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30875&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30875&r=mysqlcfg

« previous php.bugs (#69378) next »