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:
parent
8f5ea4bacd
commit
6418ba1696
|
@ -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() {
|
||||||
|
|
Loading…
Reference in New Issue