From 2e5f0e8bde2b1db767eea116bd17572aa2524ad1 Mon Sep 17 00:00:00 2001 From: rob1n Date: Thu, 12 Apr 2007 23:19:16 +0000 Subject: [PATCH] Don't treat object and param as block elements in wpautop. fixes #3854 git-svn-id: https://develop.svn.wordpress.org/trunk@5262 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/formatting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index e7a4e1ddfb..14eb5b8d87 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -55,7 +55,7 @@ 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); // Space things out a little - $allblocks = '(?:table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|map|area|blockquote|address|math|style|object|input|param|p|h[1-6]|hr)'; + $allblocks = '(?:table|thead|tfoot|caption|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|form|map|area|blockquote|address|math|style|input|p|h[1-6]|hr)'; $pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', "\n$1", $pee); $pee = preg_replace('!()!', "$1\n\n", $pee); $pee = str_replace(array("\r\n", "\r"), "\n", $pee); // cross-platform newlines