Merge pull request #3 from kijin/php7

PHP7 호환성 개선
This commit is contained in:
CONORY 2015-12-18 14:15:15 +09:00
commit de0c54ff37
12 changed files with 24 additions and 20 deletions

View file

@ -1200,7 +1200,7 @@ function removeSrcHack($match)
continue;
}
$val = preg_replace('/&#(?:x([a-fA-F0-9]+)|0*(\d+));/e', 'chr("\\1"?0x00\\1:\\2+0)', $m[3][$idx] . $m[4][$idx]);
$val = preg_replace_callback('/&#(?:x([a-fA-F0-9]+)|0*(\d+));/', function($n) {return chr($n[1] ? ('0x00' . $n[1]) : ($n[2] + 0)); }, $m[3][$idx] . $m[4][$idx]);
$val = preg_replace('/^\s+|[\t\n\r]+/', '', $val);
if(preg_match('/^[a-z]+script:/i', $val))