summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--ext/standard/html.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 64dd091ad4..2a3689a797 100644
--- a/NEWS
+++ b/NEWS
@@ -82,6 +82,8 @@ PHP NEWS
- Changed exception handling. Now each op_array doesn't contain
ZEND_HANDLE_EXCEPTION opcode in the end. (Dmitry)
+- Fixed html_entity_decode() incorrectly converting numeric html entities
+ to different characters with cp1251 and cp866. (Scott)
- Fixed possible crash in ext/soap because of uninitialized value. (Zdash Urf)
- Fixed bug #43808 (date_create never fails (even when it should)). (Derick)
diff --git a/ext/standard/html.c b/ext/standard/html.c
index 7014332d8d..795eeba163 100644
--- a/ext/standard/html.c
+++ b/ext/standard/html.c
@@ -1034,8 +1034,6 @@ PHPAPI char *php_unescape_html_entities(unsigned char *old, int oldlen, int *new
break;
case cs_cp1252:
- case cs_cp1251:
- case cs_cp866:
if (code > 0xff) {
invalid_code = 1;
} else {
@@ -1043,6 +1041,8 @@ PHPAPI char *php_unescape_html_entities(unsigned char *old, int oldlen, int *new
}
break;
+ case cs_cp1251:
+ case cs_cp866:
case cs_big5:
case cs_big5hkscs:
case cs_sjis: