From 0298b896eb90d928b287168c30a6519ce46a6400 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Fri, 29 Feb 2008 17:49:50 +0000 Subject: [PATCH] Use preg_replace_callback instead of 'e' modifier. see #5644 git-svn-id: https://develop.svn.wordpress.org/trunk@7106 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/kses.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/kses.php b/wp-includes/kses.php index 042d9cde92..edb0680c4c 100644 --- a/wp-includes/kses.php +++ b/wp-includes/kses.php @@ -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;