X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/899389d1e4043331309c0433543419258b230b60..refs/tags/wordpress-4.2.3:/wp-includes/formatting.php
diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php
index acdc3d78..08c367c6 100644
--- a/wp-includes/formatting.php
+++ b/wp-includes/formatting.php
@@ -421,6 +421,9 @@ function wpautop($pee, $br = true) {
// Standardize newline characters to "\n".
$pee = str_replace(array("\r\n", "\r"), "\n", $pee);
+ // Strip newlines from all elements.
+ $pee = wp_replace_in_html_tags( $pee, array( "\n" => " " ) );
+
// Collapse line breaks before and after