mirror of
https://github.com/php/php-src.git
synced 2024-09-22 18:37:25 +00:00
htmlspecialchars and htmlentities will now
encode single quotes to ' (due to feature request in BUG ID#5254)
This commit is contained in:
parent
005d4c4deb
commit
772c4026bb
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user