diff --git a/src/wp-admin/js/editor.js b/src/wp-admin/js/editor.js index d64d3e6045..8602b1409e 100644 --- a/src/wp-admin/js/editor.js +++ b/src/wp-admin/js/editor.js @@ -236,7 +236,7 @@ // Protect pre|script tags if ( text.indexOf( ']*>[\s\S]+?<\/\1>/g, function( a ) { + text = text.replace( /<(pre|script)[^>]*>[\s\S]*?<\/\1>/g, function( a ) { return a.replace( /\n/g, '' ); }); }