diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 26b81585a2..dad5e78a07 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -63,7 +63,6 @@ function wpautop($pee, $br = 1) { $pee = preg_replace("/\n\n+/", "\n\n", $pee); // take care of duplicates $pee = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s', "

$1

\n", $pee); // make paragraphs, including one at the end $pee = preg_replace('|

\s*?

|', '', $pee); // under certain strange conditions it could create a P of entirely whitespace - $pee = preg_replace( '|

(]*>\s*)|', "$1

", $pee ); $pee = preg_replace('!

([^<]+)\s*?(]*>)!', "

$1

$2", $pee); $pee = preg_replace( '|

|', "$1

", $pee ); $pee = preg_replace('!

\s*(]*>)\s*

!', "$1", $pee); // don't pee all over a tag @@ -82,7 +81,7 @@ function wpautop($pee, $br = 1) { if ( strstr( $pee, ')(.*?)!ise', " stripslashes('$1') . stripslashes(clean_pre('$2')) . '' ", $pee); $pee = preg_replace( "|\n

$|", '

', $pee ); -/**/ + return $pee; }