diff --git a/src/js/_enqueues/vendor/tinymce/plugins/wordpress/plugin.js b/src/js/_enqueues/vendor/tinymce/plugins/wordpress/plugin.js index 2f9283281f..fdb3856d78 100644 --- a/src/js/_enqueues/vendor/tinymce/plugins/wordpress/plugin.js +++ b/src/js/_enqueues/vendor/tinymce/plugins/wordpress/plugin.js @@ -113,8 +113,13 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) { 'alt="" title="' + title + '" data-mce-resize="false" data-mce-placeholder="1" />' ); } - if ( event.load && event.format !== 'raw' && hasWpautop ) { - event.content = wp.editor.autop( event.content ); + if ( event.load && event.format !== 'raw' ) { + if ( hasWpautop ) { + event.content = wp.editor.autop( event.content ); + } else { + // Prevent creation of paragraphs out of multiple HTML comments. + event.content = event.content.replace( /-->\s+\s*\n\n