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:
ryan 2008-02-29 18:28:32 +00:00
parent 6fe2cd5873
commit 03170d477f

View File

@ -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);
}
/**