Don't output <br /> for empty posts, props Denis-de-Bernardy, fixes #6128
git-svn-id: http://svn.automattic.com/wordpress/trunk@11048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bae49e8f79
commit
3321ea5ec8
|
@ -114,6 +114,8 @@ function clean_pre($matches) {
|
||||||
* @return string Text which has been converted into correct paragraph tags.
|
* @return string Text which has been converted into correct paragraph tags.
|
||||||
*/
|
*/
|
||||||
function wpautop($pee, $br = 1) {
|
function wpautop($pee, $br = 1) {
|
||||||
|
if ( trim($pee) === '' )
|
||||||
|
return '';
|
||||||
$pee = $pee . "\n"; // just to make things a little easier, pad the end
|
$pee = $pee . "\n"; // just to make things a little easier, pad the end
|
||||||
$pee = preg_replace('|<br />\s*<br />|', "\n\n", $pee);
|
$pee = preg_replace('|<br />\s*<br />|', "\n\n", $pee);
|
||||||
// Space things out a little
|
// Space things out a little
|
||||||
|
|
Loading…
Reference in New Issue