mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-09 15:28:40 +00:00
Remove call to PHP 5 only function.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@355 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
parent
0e715bdda6
commit
eddf474351
@ -54,7 +54,12 @@ class HTMLPurifier_EntityParserTest extends UnitTestCase
|
||||
'&#x' . dechex($arg[0]) . ';'; // hex
|
||||
$expect = '';
|
||||
if ($arg[1] !== false) {
|
||||
$chars = str_split($arg[1], 2);
|
||||
// this is only for PHP 5, the below is PHP 5 and PHP 4
|
||||
//$chars = str_split($arg[1], 2);
|
||||
$chars = array();
|
||||
for ($i = 0; isset($arg[1][$i]); $i += 2) {
|
||||
$chars[] = $arg[1][$i] . $arg[1][$i+1];
|
||||
}
|
||||
foreach ($chars as $char) {
|
||||
$expect .= chr(hexdec($char));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user