summaryrefslogtreecommitdiff
path: root/ext/standard/html.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-05-01 19:48:55 +0000
committerIlia Alshanetsky <iliaa@php.net>2005-05-01 19:48:55 +0000
commit8209835e5a8bf98611011ec08d0eeb198c590c0b (patch)
tree4ddf07e94c60f466cf129cdee42129ec36f44c7a /ext/standard/html.c
parent90ee88e090fcd2a51ec04933ef26845a91634930 (diff)
downloadphp-git-8209835e5a8bf98611011ec08d0eeb198c590c0b.tar.gz
Fixed bug #32608 (html_entity_decode() converts single quotes even if
ENT_NOQUOTES is given).
Diffstat (limited to 'ext/standard/html.c')
-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;