Use preg_replace_callback instead of 'e' modifier. see #5644
git-svn-id: https://develop.svn.wordpress.org/trunk@7107 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0298b896eb
commit
04ff7f125c
@ -825,7 +825,9 @@ function wp_kses_html_error($string) {
|
||||
* @return string Sanitized content
|
||||
*/
|
||||
function wp_kses_bad_protocol_once($string, $allowed_protocols) {
|
||||
return preg_replace('/^((&[^;]*;|[\sA-Za-z0-9])*)'.'(:|:|&#[Xx]3[Aa];)\s*/e', 'wp_kses_bad_protocol_once2("\\1", $allowed_protocols)', $string);
|
||||
global $_kses_allowed_protocols;
|
||||
$_kses_allowed_protocols = $allowed_protocols;
|
||||
return preg_replace_callback('/^((&[^;]*;|[\sA-Za-z0-9])*)'.'(:|:|&#[Xx]3[Aa];)\s*/', create_function('$matches', 'global $_kses_allowed_protocols; return wp_kses_bad_protocol_once2($matches[1], $_kses_allowed_protocols);'), $string);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user