]> granicus.if.org Git - php/commitdiff
Fix html_entity_decode when converting numeric html entities, the numeric values...
authorScott MacVicar <scottmac@php.net>
Fri, 25 Jan 2008 18:10:45 +0000 (18:10 +0000)
committerScott MacVicar <scottmac@php.net>
Fri, 25 Jan 2008 18:10:45 +0000 (18:10 +0000)
NEWS
ext/standard/html.c

diff --git a/NEWS b/NEWS
index 64dd091ad4995babf294720a3a516934bb870bea..2a3689a79785e36ba0a63d09d9cd13719981e0f4 100644 (file)
--- 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)
index 7014332d8d76d26e8fd912f719f77db6e15bc6a3..795eeba163d0956f53f43177a3f33d3b4bb6b065 100644 (file)
@@ -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: