php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay

| files >> /opt/php-7.0.1/ext/standard/tests/strings/ |
| files >> //opt/php-7.0.1/ext/standard/tests/strings/html_entity_decode1.phpt |
--TEST--
html_entity_decode: Decoding of entities after invalid entities
--FILE--
<?php
$arr = array(
"&",
"&&",
"&$",
"&#&",
"&#$",
"&#x&",
"&#x$",
"&",
"$",
" &",
" $",
"&",
"$",
"&",
"$",
"&a&",
"&a$",
"&aa&",
"&aa$",
"&aa;&",
"&aa;$",
"&;&",
"&;$",
);
$i = 0;
foreach ($arr as $ent) {
if ($i % 2 == 1) {
if (($a = html_entity_decode($ent, ENT_QUOTES, 'UTF-8')) !=
($b = htmlspecialchars_decode($ent, ENT_QUOTES))) {
echo "htmlspecialchars_decode <-> html_entity_decode inconsistency","\n",
"$b <-> $a","\n";
}
}
echo html_entity_decode($ent, ENT_QUOTES, 'UTF-8'), "\n";
}
echo "Done.\n";
--EXPECT--
&
&&
&$
&#&
&#$
&#x&
&#x$
&
$
 &
 $
&
$
&
$
&a&
&a$
&aa&
&aa$
&aa;&
&aa;$
&;&
&;$
Done.
y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`