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:
@@ -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;
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
--TEST--
|
||||
Bug #43927 (koi8r is missing from html_entity_decode())
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(html_entity_decode("&lt;", ENT_COMPAT, 'koi8-r'));
|
||||
var_dump(html_entity_decode("&#38;", ENT_COMPAT, 'koi8-r'));
|
||||
var_dump(html_entity_decode("&#38;lt;", ENT_COMPAT, 'koi8-r'));
|
||||
?>
|
||||
--EXPECT--
|
||||
string(4) "<"
|
||||
string(5) "&"
|
||||
string(8) "&lt;"
|
||||
--UEXPECT--
|
||||
unicode(4) "<"
|
||||
unicode(5) "&"
|
||||
unicode(8) "&lt;"
|
||||
Reference in New Issue
Block a user