From 3e494326c42cecf8bd87bfe98d96d5722e559211 Mon Sep 17 00:00:00 2001 From: saxmatt Date: Thu, 15 Jan 2004 11:01:21 +0000 Subject: [PATCH] Fix for mpts markup prob. git-svn-id: http://svn.automattic.com/wordpress/trunk@779 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 3b77d7dd0a..3de6712d70 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