Ticket #8630: 8630_4.patch

File 8630_4.patch, 965 bytes (added by Frederico Caldeira Knabben, 12 years ago)
  • _source/plugins/htmldataprocessor/plugin.js

     
    516516                        // Call the browser to help us fixing a possibly invalid HTML
    517517                        // structure.
    518518                        var div = new CKEDITOR.dom.element( 'div' );
     519
     520                        // Prevent execution of event handlers in the div (#8630)
     521                        var prefix = 'data-cke' + CKEDITOR.tools.getNextNumber() + '-';
     522                        data = data.replace( /(\s)(on)/ig, '$1' + prefix + '$2' );
     523
    519524                        // Add fake character to workaround IE comments bug. (#3801)
    520525                        div.setHtml( 'a' + data );
    521526                        data = div.getHtml().substr( 1 );
    522527
     528                        // Restore event handlers (#8630)
     529                        data = data.replace( new RegExp( prefix, 'gi' ), '' );
     530
    523531                        // Unprotect "some" of the protected elements at this point.
    524532                        data = unprotectElementNames( data );
    525533
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy