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:
Andrew Ozz 2017-01-17 01:24:35 +00:00
parent 8e3b56fbe3
commit e3ffbce181
1 changed files with 7 additions and 1 deletions

View File

@ -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 );
});
}
});
}