Make WordPress Core

Changeset 39916


Ignore:
Timestamp:
01/17/2017 01:24:35 AM (10 years ago)
Author:
azaozz
Message:

TinyMCE: strip browser inserted <u> and <font>` tags from inside links when copying and pasting in IE and Edge.

Fixes #39570.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js

    r39910 r39916  
    544544                        editor.on( 'PastePostProcess', function( event ) {
    545545                                // Remove empty paragraphs
    546                                 each( dom.select( 'p', event.node ), function( node ) {
     546                                editor.$( 'p', event.node ).each( function( i, node ) {
    547547                                        if ( dom.isEmpty( node ) ) {
    548548                                                dom.remove( node );
    549549                                        }
    550550                                });
     551
     552                                if ( tinymce.isIE ) {
     553                                        editor.$( 'a', event.node ).find( 'font, u' ).each( function( i, node ) {
     554                                                dom.remove( node, true );
     555                                        });
     556                                }
    551557                        });
    552558                }
Note: See TracChangeset for help on using the changeset viewer.