From 3321ea5ec8408d647ef9fcc295d34a1d66c4880f Mon Sep 17 00:00:00 2001 From: azaozz Date: Wed, 22 Apr 2009 07:37:24 +0000 Subject: [PATCH] Don't output
for empty posts, props Denis-de-Bernardy, fixes #6128 git-svn-id: http://svn.automattic.com/wordpress/trunk@11048 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/formatting.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 0d247afd0a..2517dc506a 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -114,6 +114,8 @@ function clean_pre($matches) { * @return string Text which has been converted into correct paragraph tags. */ function wpautop($pee, $br = 1) { + if ( trim($pee) === '' ) + return ''; $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