X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/53f4633144ed68c8b8fb5861f992b5489894a940..dc1231b7312fbdca99e9e887cc2bb35a28f85cdc:/wp-includes/formatting.php diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index fa9551a3..640e136f 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -596,7 +596,9 @@ function wpautop( $pee, $br = true ) { $pee = str_replace(array_keys($pre_tags), array_values($pre_tags), $pee); // Restore newlines in all elements. - $pee = str_replace( " ", "\n", $pee ); + if ( false !== strpos( $pee, '' ) ) { + $pee = str_replace( array( ' ', '' ), "\n", $pee ); + } return $pee; }