2
html_entity_decode: Do not decode numerical entities that refer to non-SGML or otherwise disallowed chars
13
"
", //note that HTML5 is unique in that it forbids this entity, but allows a literal U+0D
16
" ", //allowed always
20
" ", //allowed always
21
"퟿", //surrogates
24
"", //allowed always
27
"﷏", //allowed always
30
"ﷰ", //allowed always
31
"", //nonchar
35
echo "*** HTML 4.01 ***\n";
37
foreach ($tests as $t) {
38
$dec = html_entity_decode($t, ENT_QUOTES | ENT_HTML401, "UTF-8");
40
echo "$t\tNOT DECODED\n";
46
echo "\n*** XHTML 1.0 ***\n";
48
foreach ($tests as $t) {
49
$dec = html_entity_decode($t, ENT_QUOTES | ENT_XHTML, "UTF-8");
51
echo "$t\tNOT DECODED\n";
57
echo "\n*** HTML5 ***\n";
59
foreach ($tests as $t) {
60
$dec = html_entity_decode($t, ENT_QUOTES | ENT_HTML5, "UTF-8");
62
echo "$t\tNOT DECODED\n";
68
echo "\n*** XML 1.0 ***\n";
70
foreach ($tests as $t) {
71
$dec = html_entity_decode($t, ENT_QUOTES | ENT_XML1, "UTF-8");
73
echo "$t\tNOT DECODED\n";
162
 NOT DECODED
163
 NOT DECODED