moriyoshi Thu Oct 2 03:00:57 2003 EDT Added files: (Branch: PHP_4_3) /php-src/ext/standard/tests/strings bug25707.phpt
Modified files: /php-src/ext/standard html.c Log: Fixed bug #25707 (html_entity_decode over-decodes &lt;) # note: not MFH stuff Index: php-src/ext/standard/html.c diff -u php-src/ext/standard/html.c:1.63.2.15 php-src/ext/standard/html.c:1.63.2.16 --- php-src/ext/standard/html.c:1.63.2.15 Thu May 8 11:44:32 2003 +++ php-src/ext/standard/html.c Thu Oct 2 03:00:55 2003 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: html.c,v 1.63.2.15 2003/05/08 15:44:32 moriyoshi Exp $ */ +/* $Id: html.c,v 1.63.2.16 2003/10/02 07:00:55 moriyoshi Exp $ */ /* * HTML entity resources: @@ -415,12 +415,12 @@ int entitylen; int flags; } basic_entities[] = { - { '&', "&", 5, 0 }, { '"', """, 6, ENT_HTML_QUOTE_DOUBLE }, { '\'', "'", 6, ENT_HTML_QUOTE_SINGLE }, { '\'', "'", 5, ENT_HTML_QUOTE_SINGLE }, { '<', "<", 4, 0 }, { '>', ">", 4, 0 }, + { '&', "&", 5, 0 }, /* this should come last */ { 0, NULL, 0, 0 } }; Index: php-src/ext/standard/tests/strings/bug25707.phpt +++ php-src/ext/standard/tests/strings/bug25707.phpt --TEST-- Bug #25707 (html_entity_decode over-decodes &lt;) --FILE-- <?php var_dump(html_entity_decode("&lt;", ENT_COMPAT, 'ISO-8859-1')); var_dump(html_entity_decode("&#38;", ENT_COMPAT, 'ISO-8859-1')); var_dump(html_entity_decode("&#38;lt;", ENT_COMPAT, 'ISO-8859-1')); ?> --EXPECT-- string(4) "<" string(5) "&" string(8) "&lt;" -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php