From a7fe84505d3a22d8f87fde4d6f45f46843aba4b6 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 27 Feb 2008 21:19:59 +0000 Subject: [PATCH] Use preg_replace_callback() instead of using the 'e' modifier. git-svn-id: http://svn.automattic.com/wordpress/branches/2.3@7068 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/formatting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 76f41d8523..495c328b06 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -79,7 +79,7 @@ function wpautop($pee, $br = 1) { $pee = preg_replace('!

\s*(]*>)!', "$1", $pee); $pee = preg_replace('!(]*>)\s*

!', "$1", $pee); if ($br) { - $pee = preg_replace('/<(script|style).*?<\/\\1>/se', 'str_replace("\n", "", "\\0")', $pee); + $pee = preg_replace_callback('/<(script|style).*?<\/\\1>/s', create_function('$matches', 'return str_replace("\n", "", $matches[0]);'), $pee); $pee = preg_replace('|(?)\s*\n|', "
\n", $pee); // optionally make line breaks $pee = str_replace('', "\n", $pee); }