diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 67cff31138..abdd5bd8e0 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -83,7 +83,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); }