From: Ilia Alshanetsky Date: Sun, 1 May 2005 19:48:55 +0000 (+0000) Subject: Fixed bug #32608 (html_entity_decode() converts single quotes even if X-Git-Tag: php-5.0.1b1~356 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8209835e5a8bf98611011ec08d0eeb198c590c0b;p=php Fixed bug #32608 (html_entity_decode() converts single quotes even if ENT_NOQUOTES is given). --- diff --git a/ext/standard/html.c b/ext/standard/html.c index 615eb47689..a50f1fd4f3 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -996,7 +996,11 @@ PHPAPI char *php_unescape_html_entities(unsigned char *old, int oldlen, int *new if ((code >= 0x80 && code < 0xa0) || code > 0xff) { invalid_code = 1; } else { - *(q++) = code; + if (code == 39 || !quote_style) { + invalid_code = 1; + } else { + *(q++) = code; + } } break;