diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 3b77d7dd0..3de6712d7 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -67,8 +67,8 @@ function wptexturize($text) { function wpautop($pee, $br = 1) { $pee = $pee . "\n"; // just to make things a little easier, pad the end $pee = preg_replace('|
\s*
|', "\n\n", $pee); - $pee = preg_replace('!(<(?:table|ul|ol|li|pre|form|blockquote|h[1-6])[^>]*>)!', "\n$1", $pee); // Space things out a little - $pee = preg_replace('!()!', "$1\n", $pee); // Space things out a little + $pee = preg_replace('!(<(?:table|tr|td|th|div|ul|ol|li|pre|select|form|blockquote|p|h[1-6])[^>]*>)!', "\n$1", $pee); // Space things out a little + $pee = preg_replace('!()!', "$1\n", $pee); // Space things out a little $pee = preg_replace("/(\r\n|\r)/", "\n", $pee); // cross-platform newlines $pee = preg_replace("/\n\n+/", "\n\n", $pee); // take care of duplicates $pee = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s', "\t

$1

\n", $pee); // make paragraphs, including one at the end