From: Hartmut Holzgraefe Date: Tue, 25 Jul 2000 10:18:06 +0000 (+0000) Subject: htmlspecialchars and htmlentities will now X-Git-Tag: PRE_FILE_COMPILE_API_CHANGE~151 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=772c4026bb66adbcfdfbdd37e268c10b358a1542;p=php htmlspecialchars and htmlentities will now encode single quotes to ' (due to feature request in BUG ID#5254) --- diff --git a/ext/standard/html.c b/ext/standard/html.c index 9c7a8e9fad..2b9dd2ccca 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -66,6 +66,10 @@ PHPAPI char *php_escape_html_entities(unsigned char *old, int oldlen, int *newle } else if (34 == *old) { memcpy (new + len, """, 6); len += 6; + } else if (39 == *old) { + /* single quote (') */ + memcpy (new + len, "'",6); + len += 6; } else if (60 == *old) { memcpy (new + len, "<", 4); len += 4;