From 27cf3f29910ceb94200f0d7a50be8bc0aed559ef Mon Sep 17 00:00:00 2001 From: Andrew Ozz 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: https://develop.svn.wordpress.org/trunk@11048 602fd350-edb4-49c9-b593-d223f7449a82 --- 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