diff --git a/src/wp-admin/js/editor.js b/src/wp-admin/js/editor.js index 27a463c5dd..14a09c44ef 100644 --- a/src/wp-admin/js/editor.js +++ b/src/wp-admin/js/editor.js @@ -168,6 +168,11 @@ window.switchEditors = { content = content.replace( new RegExp('\\s*(' + blocklist2 + ')>\\s*', 'g' ), '$1>\n' ); content = content.replace( /
$1
\n' ); diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php index 2a01ea8db2..0f3f93ad23 100644 --- a/src/wp-includes/formatting.php +++ b/src/wp-includes/formatting.php @@ -392,6 +392,12 @@ function wpautop($pee, $br = true) { $pee = preg_replace('!(' . $allblocks . '>)!', "$1\n\n", $pee); $pee = str_replace(array("\r\n", "\r"), "\n", $pee); // cross-platform newlines + if ( strpos( $pee, '', $pee ); + } + if ( strpos( $pee, '' ) !== false ) { // no P/BR around param and embed $pee = preg_replace( '|(