1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 18:23:26 +02:00

MFB: fix #43927 (koi8r is missing from html_entity_decode())

patch by andy at demos dot su
This commit is contained in:
Antony Dovgal
2008-01-28 23:08:07 +00:00
parent 6d9fdbce50
commit bc9cba1a93
2 changed files with 17 additions and 0 deletions
+1
View File
@@ -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;
+16
View File
@@ -0,0 +1,16 @@
--TEST--
Bug #43927 (koi8r is missing from html_entity_decode())
--FILE--
<?php
var_dump(html_entity_decode("&amp;lt;", ENT_COMPAT, 'koi8-r'));
var_dump(html_entity_decode("&amp;#38;", ENT_COMPAT, 'koi8-r'));
var_dump(html_entity_decode("&amp;#38;lt;", ENT_COMPAT, 'koi8-r'));
?>
--EXPECT--
string(4) "&lt;"
string(5) "&#38;"
string(8) "&#38;lt;"
--UEXPECT--
unicode(4) "&lt;"
unicode(5) "&#38;"
unicode(8) "&#38;lt;"