From 03170d477f6d9a67ab51f59eb74c997ca94143e1 Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 29 Feb 2008 18:28:32 +0000 Subject: [PATCH] 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 --- wp-includes/kses.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-includes/kses.php b/wp-includes/kses.php index edb0680c4c..01a263d7a7 100644 --- a/wp-includes/kses.php +++ b/wp-includes/kses.php @@ -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); } /**