mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-29 07:37:44 +02:00
Use preg_replace_callback instead of 'e' modifier. see #5644
git-svn-id: http://svn.automattic.com/wordpress/trunk@7107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6fe2cd5873
commit
03170d477f
@ -825,7 +825,9 @@ function wp_kses_html_error($string) {
|
|||||||
* @return string Sanitized content
|
* @return string Sanitized content
|
||||||
*/
|
*/
|
||||||
function wp_kses_bad_protocol_once($string, $allowed_protocols) {
|
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