summaryrefslogtreecommitdiff
path: root/ext/standard/html.c
diff options
context:
space:
mode:
authorHartmut Holzgraefe <hholzgra@php.net>2000-07-25 10:18:06 +0000
committerHartmut Holzgraefe <hholzgra@php.net>2000-07-25 10:18:06 +0000
commit772c4026bb66adbcfdfbdd37e268c10b358a1542 (patch)
tree1bd50ecb92b677c1e5a43daa76274fc82c7d0c3d /ext/standard/html.c
parent005d4c4deb5bd1391b2e26cfae640ff2a8852da9 (diff)
downloadphp-git-772c4026bb66adbcfdfbdd37e268c10b358a1542.tar.gz
htmlspecialchars and htmlentities will now
encode single quotes to &#39; (due to feature request in BUG ID#5254)
Diffstat (limited to 'ext/standard/html.c')
-rw-r--r--ext/standard/html.c4
1 files changed, 4 insertions, 0 deletions
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, "&quot;", 6);
len += 6;
+ } else if (39 == *old) {
+ /* single quote (') */
+ memcpy (new + len, "&#039;",6);
+ len += 6;
} else if (60 == *old) {
memcpy (new + len, "&lt;", 4);
len += 4;