Regex should be non-greedy, see #28389

git-svn-id: https://develop.svn.wordpress.org/trunk@28615 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2014-05-29 07:55:17 +00:00
parent 8f5ea4bacd
commit 6418ba1696
1 changed files with 1 additions and 1 deletions

View File

@ -945,7 +945,7 @@ tinymce.PluginManager.add( 'wpeditimage', function( editor ) {
// Remove toolbar from undo levels // Remove toolbar from undo levels
editor.on( 'BeforeAddUndo', function( event ) { editor.on( 'BeforeAddUndo', function( event ) {
event.level.content = event.level.content.replace( /<p [^>]*data-mce-bogus[^>]+>[\s\S]*<\/p>/g, '' ); event.level.content = event.level.content.replace( /<p [^>]*data-mce-bogus[^>]+>[\s\S]*?<\/p>/g, '' );
}); });
editor.on( 'cut', function() { editor.on( 'cut', function() {