From: Gustavo André dos Santos Lopes Date: Fri, 8 Oct 2010 17:27:19 +0000 (+0000) Subject: - Fixed a typo in rev #304208 (24 instead of 34/'"'). X-Git-Tag: php-5.4.0alpha1~191^2~804 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dd5d1b2b66d3ad949609e76127913d46bf7cf573;p=php - Fixed a typo in rev #304208 (24 instead of 34/'"'). - Improved the test bug53021.phpt to reflect other fixes in rev #304208. - Updated NEWS to reflect other fixes in rev #304208. --- diff --git a/ext/standard/html.c b/ext/standard/html.c index 900cb3910f..7a14f6b0ad 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -1020,8 +1020,8 @@ PHPAPI char *php_unescape_html_entities(unsigned char *old, int oldlen, int *new code = strtol(p + 2, &next, 10); } - if (code == 39 && !(quote_style & ENT_HTML_QUOTE_SINGLE) || - code == 24 && !(quote_style & ENT_HTML_QUOTE_DOUBLE)) { + if (code == '\'' && !(quote_style & ENT_HTML_QUOTE_SINGLE) || + code == '"' && !(quote_style & ENT_HTML_QUOTE_DOUBLE)) { invalid_code = 1; } diff --git a/ext/standard/tests/strings/bug53021.phpt b/ext/standard/tests/strings/bug53021.phpt index 6f290096e4..4a8fbe4f76 100644 --- a/ext/standard/tests/strings/bug53021.phpt +++ b/ext/standard/tests/strings/bug53021.phpt @@ -3,8 +3,32 @@ Bug #53021 (Failure to convert numeric entities with ENT_NOQUOTES and ISO-8859-1 --FILE-- string(2) "e9" } +double quotes variations: +" +" +" +" +" +" + +single quotes variations: +' +' +'