From: Moriyoshi Koizumi Date: Thu, 12 Dec 2002 13:27:17 +0000 (+0000) Subject: MFH: Fixed bug #20934 (htmlspecialchars returns latin1 from UTF-8) X-Git-Tag: php-4.3.0RC4~65 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=21f011822d3a6bb5b841006187d47da39c17475d;p=php MFH: Fixed bug #20934 (htmlspecialchars returns latin1 from UTF-8) --- diff --git a/ext/standard/html.c b/ext/standard/html.c index b2d69cbc46..a059de0d02 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -801,7 +801,7 @@ PHPAPI char *php_escape_html_entities(unsigned char *old, int oldlen, int *newle } if (!is_basic) { - if (this_char > 0xff) { + if (mbseqlen > 1) { /* a wide char without a named entity; pass through the original sequence */ memcpy(replaced + len, mbsequence, mbseqlen); len += mbseqlen;