diff --git a/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js b/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js index a596b83c4b..ede6576185 100644 --- a/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js +++ b/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js @@ -575,7 +575,7 @@ function wpautop(pee) { pee = pee.replace(new RegExp('()', 'gi'), "$1\n\n"); pee = pee.replace(new RegExp("\\r\\n|\\r", 'g'), "\n"); pee = pee.replace(new RegExp("\\n\\s*\\n+", 'g'), "\n\n"); - pee = pee.replace(new RegExp('\n*([^\Z]+?)\\n{2}', 'mg'), "

$1

\n"); + pee = pee.replace(new RegExp('([\\s\\S]+?)\\n\\n', 'mg'), "

$1

\n"); pee = pee.replace(new RegExp('

\\s*?

', 'gi'), ''); pee = pee.replace(new RegExp('

\\s*(]*>)\\s*

', 'gi'), "$1"); pee = pee.replace(new RegExp("

(", 'gi'), "$1");