/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/mbstring/tests/bug40685.phpt
25 строк
745 B
Alex Dowad
mb_decode_numericentity decodes valid entities which are truncated at end of string
18 июл 2022, 16:11
18 июл 2022, 16:11
76a92c2
Код
Авторство
О чём код?
--TEST-- Bug #40685 (mb_decode_numericentity() removes '&' in the string) --EXTENSIONS-- mbstring --FILE-- <?php $map = array(0, 0x10FFFF, 0, 0xFFFFFF); var_dump(mb_decode_numericentity('&', $map, 'UTF-8')); var_dump(mb_decode_numericentity('&&&', $map, 'UTF-8')); var_dump(mb_decode_numericentity('&#', $map, 'UTF-8')); var_dump(mb_decode_numericentity('&#x', $map, 'UTF-8')); var_dump(mb_decode_numericentity('=', $map, 'UTF-8')); var_dump(mb_decode_numericentity('=', $map, 'UTF-8')); var_dump(mb_decode_numericentity('=', $map, 'UTF-8')); var_dump(mb_decode_numericentity('=', $map, 'UTF-8')); ?> --EXPECT-- string(1) "&" string(3) "&&&" string(2) "&#" string(3) "&#x" string(1) "=" string(1) "=" string(1) "=" string(1) "="