From dd5d1b2b66d3ad949609e76127913d46bf7cf573 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gustavo=20Andr=C3=A9=20dos=20Santos=20Lopes?= Date: Fri, 8 Oct 2010 17:27:19 +0000 Subject: [PATCH] - 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. --- ext/standard/html.c | 4 ++-- ext/standard/tests/strings/bug53021.phpt | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) 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: +' +' +' -- 2.40.0