]> granicus.if.org Git - php/commitdiff
- MFH (html.c: 1.98, bug29199.phpt: 1.1): Fix bug #29199 (html_entity_decode()
authorMoriyoshi Koizumi <moriyoshi@php.net>
Mon, 19 Jul 2004 17:53:00 +0000 (17:53 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Mon, 19 Jul 2004 17:53:00 +0000 (17:53 +0000)
  misbehaves with UTF-8)

NEWS
ext/standard/html.c

diff --git a/NEWS b/NEWS
index 1f188c9bfb2ce7469d76a92d5235a5ffb54909e2..0d751ea285519b406cb5031df4da030ff6ad2a7b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
 PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 2004, PHP 5.0.1
+- Fixed bug #29119 (html_entity_decode() misbehaves with UTF-8). (Moriyoshi)
 - Fixed bug #28829 (Thread-unsafety in bcmath elementary values). (Sara)
 - Fixed bug #28464 (catch() does not catch exceptions by interfaces). (Marcus)
 - Fixed convert.* filters to consume remaining buckets_in on flush. (Sara)
index 4f8a4be46bf0ce1422d05ed09c8ad1e9371baf3d..e3a38c3d1572547809b2973a2c4399420a6b8383 100644 (file)
@@ -157,11 +157,13 @@ static entity_table_t ent_uni_punct[] = {
        "ensp", "emsp", NULL, NULL, NULL, NULL, NULL,
        "thinsp", NULL, NULL, "zwnj", "zwj", "lrm", "rlm",
        NULL, NULL, NULL, "ndash", "mdash", NULL, NULL, NULL,
-       "lsquo", "rsquo", "sbquo", NULL, "ldquo", "rdquo", "bdquo",
+       /* 8216 */
+       "lsquo", "rsquo", "sbquo", NULL, "ldquo", "rdquo", "bdquo", NULL,
        "dagger", "Dagger",     "bull", NULL, NULL, NULL, "hellip",
        NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "permil", NULL,
-       "prime", "Prime", NULL, NULL, NULL, NULL, NULL, "lsaquo", "rsaquo",
-       NULL, NULL, NULL, "oline", NULL, NULL, NULL, NULL, NULL,
+       /* 8242 */
+       "prime", "Prime", NULL, NULL, NULL, NULL, NULL, "lsaquo", "rsaquo", NULL,
+       NULL, NULL, "oline", NULL, NULL, NULL, NULL, NULL,
        "frasl"
 };
 
@@ -899,8 +901,7 @@ PHPAPI char *php_unescape_html_entities(unsigned char *old, int oldlen, int *new
 
                                if (entity_map[j].table[k - entity_map[j].basechar] == NULL)
                                        continue;
-                       
-                               
+
                                entity[0] = '&';
                                entity_length = strlen(entity_map[j].table[k - entity_map[j].basechar]);
                                strncpy(&entity[1], entity_map[j].table[k - entity_map[j].basechar], sizeof(entity) - 2);