From bd5e9d3b08cfa05a12ff2925f3af51d8faa58089 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 20 Feb 2007 05:41:39 +0000 Subject: [PATCH] Don't insert p inside of div. fixes #3669 git-svn-id: https://develop.svn.wordpress.org/trunk@4894 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/formatting.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; }