diff --git a/src/wp-admin/js/editor.js b/src/wp-admin/js/editor.js index e2b39ca0a0..3702a770fb 100644 --- a/src/wp-admin/js/editor.js +++ b/src/wp-admin/js/editor.js @@ -205,7 +205,7 @@ window.switchEditors = { preserve_br = false, blocklist = 'table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select' + '|option|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|noscript|legend|section' + - '|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary'; + '|article|aside|hgroup|header|footer|nav|figure|details|menu|summary'; if ( pee.indexOf( '/g, function( a ) { diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php index f4c762bc86..919336df57 100644 --- a/src/wp-includes/formatting.php +++ b/src/wp-includes/formatting.php @@ -234,7 +234,7 @@ function wpautop($pee, $br = true) { $pee = preg_replace('|
\s*
|', "\n\n", $pee); // Space things out a little - $allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|option|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|noscript|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)'; + $allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|option|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|noscript|legend|section|article|aside|hgroup|header|footer|nav|figure|details|menu|summary)'; $pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', "\n$1", $pee); $pee = preg_replace('!()!', "$1\n\n", $pee); $pee = str_replace(array("\r\n", "\r"), "\n", $pee); // cross-platform newlines