iliaa Thu Dec 4 20:16:17 2003 EDT
Added files:
/php-src/ext/xml/tests bug26528.phpt
Modified files:
/php-src NEWS
/php-src/ext/xml compat.c
Log:
Fixed bug #26528 (HTML entities are not being decoded by
xml_parse()/xml_parse_into_struct()).
Index: php-src/NEWS
diff -u php-src/NEWS:1.1521 php-src/NEWS:1.1522
--- php-src/NEWS:1.1521 Thu Dec 4 18:32:22 2003
+++ php-src/NEWS Thu Dec 4 20:16:14 2003
@@ -26,6 +26,8 @@
- Fixed include_once() / require_once() on Windows to honor case-insensitivity
of files. (Andi)
- Fixed __autoload() to preserve case of the passed class name. (Andi)
+- Fixed bug #26528 (HTML entities are not being decoded by
+ xml_parse()/xml_parse_into_struct()). (Ilia)
- Fixed bug #26072 (--disable-libxml does not work). (Jani)
- Fixed bug #26083 (Non-working write support in ext/dom). (Ilia)
- Fixed bug #26001 (serialize crashes when accessing an overloaded object that
Index: php-src/ext/xml/compat.c
diff -u php-src/ext/xml/compat.c:1.20 php-src/ext/xml/compat.c:1.21
--- php-src/ext/xml/compat.c:1.20 Mon Nov 24 01:04:39 2003
+++ php-src/ext/xml/compat.c Thu Dec 4 20:16:16 2003
@@ -412,6 +412,7 @@
} else {
parser->parser->charset = XML_CHAR_ENCODING_NONE;
}
+ parser->parser->replaceEntities=1;
if (sep != NULL) {
parser->use_namespace = 1;
parser->_ns_map = xmlHashCreate(10);
Index: php-src/ext/xml/tests/bug26528.phpt
+++ php-src/ext/xml/tests/bug26528.phpt
--TEST--
Bug #26528 (HTML entities are not being decoded)
--FILE--
<?php
$sample = "<?xml version=\"1.0\"?><test attr=\"angle<bracket\"/>";
$parser = xml_parser_create();
$res = xml_parse_into_struct($parser,$sample,$vals,$index);
xml_parser_free($parser);
var_dump($vals);
?>
--EXPECT--
array(1) {
[0]=>
array(4) {
["tag"]=>
string(4) "TEST"
["type"]=>
string(8) "complete"
["level"]=>
int(1)
["attributes"]=>
array(1) {
["ATTR"]=>
string(13) "angle<bracket"
}
}
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php