Ticket #5293: 5293_2.patch

File 5293_2.patch, 814 bytes (added by Frederico Caldeira Knabben, 13 years ago)
  • _source/plugins/htmldataprocessor/plugin.js

     
    463463                        var writer = this.writer,
    464464                                fragment = CKEDITOR.htmlParser.fragment.fromHtml( html, fixForBody );
    465465
     466                        // Take the last fragment children.
     467                        var children = fragment.children,
     468                                lastChildren = children.length && children[ children.length - 1 ];
     469
     470                        // If the last children is a <br>, we assume it's a bogus, so
     471                        // remove it first. (#5293)
     472                        if ( lastChildren && lastChildren.name && lastChildren.name == 'br' )
     473                                children.pop();
     474
    466475                        writer.reset();
    467476
    468477                        fragment.writeHtml( writer, this.htmlFilter );
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy