ID:               30219
 Updated by:       [EMAIL PROTECTED]
 Reported By:      tg_surf at hotmail dot com
-Status:           Feedback
+Status:           Closed
 Bug Type:         XML related
 Operating System: Windows 2000
 PHP Version:      5.0.1
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

closing as all errors here look resolved. Open new bug if something
else pops up. For xml_parse_into_struct not sure if bug/feature or
intended behavior.


Previous Comments:
------------------------------------------------------------------------

[2004-11-20 19:01:38] joern_h at gmx dot net

Here is the complete script I used, with php5
(php5-win32-200411201530.zip) the entity is not resolved:

<?php

$xml = <<<HERE
<!DOCTYPE test [
    <!ENTITY uuml "&#252;">
]>
<test>&uuml;</test>
HERE;

function characters($parser, $data) {print "data: $data\n";}

$parser =& xml_parser_create('utf-8');
xml_set_character_data_handler($parser, 'characters');

if (!xml_parse($parser, $xml, true)) {
    echo xml_error_string(xml_get_error_code($parser)) . "\n";
}

xml_parser_free($parser);

?>

expected result (with php 4.3.8): data: ü
actual result: nothing

When using xml_parse_into_struct the entity is not expanded with php4
too, should I open another bug report for that?

------------------------------------------------------------------------

[2004-11-19 17:42:12] [EMAIL PROTECTED]

Test your script with PHP 4.3 and if output different add it here with
the expected output. The tests I ran with that xml snippet produced
same output under 4.3 (using expat) and 5 (using libxml). In both cases
the entities were not resolved in element content.

------------------------------------------------------------------------

[2004-11-19 16:47:16] joern_h at gmx dot net

I tested this with a current snapshot (php5-win32-200411190730.zip),
entities inside attributes are now reported correctly but entities in
element content are silently ignored. Here is an example document that
show this behaviour:

<!DOCTYPE test [
    <!ENTITY uuml "&#252;">
]>
<test t="&uuml;">&uuml;</test>

------------------------------------------------------------------------

[2004-11-18 21:17:56] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip



------------------------------------------------------------------------

[2004-11-12 13:13:25] michiel at trendserver dot nl

Also occurs on PHP 5.02

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/30219

-- 
Edit this bug report at http://bugs.php.net/?id=30219&edit=1

Reply via email to