Formatting: fix removing line break placeholders from HTML comments at the end of wpautop().

Props miqrogroove.
Fixes #33645 for 4.3.
Built from https://develop.svn.wordpress.org/branches/4.3@34024


git-svn-id: http://core.svn.wordpress.org/branches/4.3@33993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2015-09-10 22:23:23 +00:00
parent e1149c9ff1
commit de170f4c55

View File

@ -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( " <!-- wpnl --> ", "\n", $pee );
if ( false !== strpos( $pee, '<!-- wpnl -->' ) ) {
$pee = str_replace( array( ' <!-- wpnl --> ', '<!-- wpnl -->' ), "\n", $pee );
}
return $pee;
}