summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/standard/html.c6
1 files changed, 5 insertions, 1 deletions
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;