From: Antony Dovgal Date: Mon, 28 Jan 2008 23:08:07 +0000 (+0000) Subject: MFB: fix #43927 (koi8r is missing from html_entity_decode()) X-Git-Tag: RELEASE_2_0_0a1~737 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bc9cba1a93608331f013cbfb7f533e7dcc6074f0;p=php MFB: fix #43927 (koi8r is missing from html_entity_decode()) patch by andy at demos dot su --- diff --git a/ext/standard/html.c b/ext/standard/html.c index 7ddcd2daab..6e3e50ceb5 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -958,6 +958,7 @@ PHPAPI char *php_unescape_html_entities(char *orig, int oldlen, int *newlen, int case cs_cp1251: case cs_8859_5: case cs_cp866: + case cs_koi8r: replacement[0] = k; replacement[1] = '\0'; replacement_len = 1; diff --git a/ext/standard/tests/strings/bug43927.phpt b/ext/standard/tests/strings/bug43927.phpt new file mode 100644 index 0000000000..a2e8d053d6 --- /dev/null +++ b/ext/standard/tests/strings/bug43927.phpt @@ -0,0 +1,16 @@ +--TEST-- +Bug #43927 (koi8r is missing from html_entity_decode()) +--FILE-- + +--EXPECT-- +string(4) "<" +string(5) "&" +string(8) "&lt;" +--UEXPECT-- +unicode(4) "<" +unicode(5) "&" +unicode(8) "&lt;"