TinyMCE: strip browser inserted `<u>` and <font>` tags from inside links when copying and pasting in IE and Edge.
Fixes #39570. git-svn-id: https://develop.svn.wordpress.org/trunk@39916 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8e3b56fbe3
commit
e3ffbce181
|
@ -543,11 +543,17 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
|
|||
|
||||
editor.on( 'PastePostProcess', function( event ) {
|
||||
// Remove empty paragraphs
|
||||
each( dom.select( 'p', event.node ), function( node ) {
|
||||
editor.$( 'p', event.node ).each( function( i, node ) {
|
||||
if ( dom.isEmpty( node ) ) {
|
||||
dom.remove( node );
|
||||
}
|
||||
});
|
||||
|
||||
if ( tinymce.isIE ) {
|
||||
editor.$( 'a', event.node ).find( 'font, u' ).each( function( i, node ) {
|
||||
dom.remove( node, true );
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue