cvs: php-src(PHP_4_3) /ext/standard html.c /ext/standard/tests/strings bug25707.phpt

From: Date: Thu, 02 Oct 2003 07:00:57 +0000
Subject: cvs: php-src(PHP_4_3) /ext/standard html.c /ext/standard/tests/strings bug25707.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-23980@lists.php.net to get a copy of this message
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 &amp;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[] = { - { '&', "&amp;", 5, 0 }, { '"', "&quot;", 6, ENT_HTML_QUOTE_DOUBLE }, { '\'', "&#039;", 6, ENT_HTML_QUOTE_SINGLE }, { '\'', "&#39;", 5, ENT_HTML_QUOTE_SINGLE }, { '<', "&lt;", 4, 0 }, { '>', "&gt;", 4, 0 }, + { '&', "&amp;", 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 &amp;lt;) --FILE-- <?php var_dump(html_entity_decode("&amp;lt;", ENT_COMPAT, 'ISO-8859-1')); var_dump(html_entity_decode("&amp;#38;", ENT_COMPAT, 'ISO-8859-1')); var_dump(html_entity_decode("&amp;#38;lt;", ENT_COMPAT, 'ISO-8859-1')); ?> --EXPECT-- string(4) "&lt;" string(5) "&#38;" string(8) "&#38;lt;"

« previous php.cvs (#23980) next »