Use preg_replace_callback instead of 'e' modifier. see #5644
git-svn-id: http://svn.automattic.com/wordpress/trunk@7106 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
dcc9de1076
commit
6fe2cd5873
|
@ -881,7 +881,7 @@ function wp_kses_normalize_entities($string) {
|
|||
# Change back the allowed entities in our entity whitelist
|
||||
|
||||
$string = preg_replace('/&([A-Za-z][A-Za-z0-9]{0,19});/', '&\\1;', $string);
|
||||
$string = preg_replace('/&#0*([0-9]{1,5});/e', 'wp_kses_normalize_entities2("\\1")', $string);
|
||||
$string = preg_replace_callback('/&#0*([0-9]{1,5});/', create_function('$matches', 'return wp_kses_normalize_entities2($matches[1]);'), $string);
|
||||
$string = preg_replace('/&#([Xx])0*(([0-9A-Fa-f]{2}){1,2});/', '&#\\1\\2;', $string);
|
||||
|
||||
return $string;
|
||||
|
|
Loading…
Reference in New Issue