mirror of
https://github.com/php/php-src.git
synced 2024-10-01 06:46:08 +00:00
4e2fd7eeba
- Improved the test bug53021.phpt to reflect other fixes in rev #304208. - Updated NEWS to reflect other fixes in rev #304208.
35 lines
997 B
PHP
35 lines
997 B
PHP
--TEST--
|
|
Bug #53021 (Failure to convert numeric entities with ENT_NOQUOTES and ISO-8859-1)
|
|
--FILE--
|
|
<?php
|
|
var_dump(unpack("H*",html_entity_decode("é", ENT_QUOTES, "ISO-8859-1")));
|
|
echo "double quotes variations:", "\n";
|
|
echo html_entity_decode(""", ENT_NOQUOTES, 'UTF-8'), "\n";
|
|
echo html_entity_decode(""", ENT_NOQUOTES, 'UTF-8'), "\n";
|
|
echo html_entity_decode(""", ENT_QUOTES, 'UTF-8'), "\n";
|
|
echo html_entity_decode(""", ENT_QUOTES, 'UTF-8'), "\n";
|
|
echo html_entity_decode(""", ENT_COMPAT, 'UTF-8'), "\n";
|
|
echo html_entity_decode(""", ENT_COMPAT, 'UTF-8'), "\n";
|
|
|
|
echo "\nsingle quotes variations:", "\n";
|
|
echo html_entity_decode("'", ENT_NOQUOTES, 'UTF-8'), "\n";
|
|
echo html_entity_decode("'", ENT_QUOTES, 'UTF-8'), "\n";
|
|
echo html_entity_decode("'", ENT_COMPAT, 'UTF-8'), "\n";
|
|
--EXPECT--
|
|
array(1) {
|
|
[1]=>
|
|
string(2) "e9"
|
|
}
|
|
double quotes variations:
|
|
"
|
|
"
|
|
"
|
|
"
|
|
"
|
|
"
|
|
|
|
single quotes variations:
|
|
'
|
|
'
|
|
'
|