Ticket #5455: 5455_6.patch

File 5455_6.patch, 833 bytes (added by Frederico Caldeira Knabben, 14 years ago)
  • _source/core/dom/element.js

     
    850850                        :
    851851                                function()
    852852                                {
    853                                         var attributes = this.$.attributes;
    854                                         return ( attributes.length > 1 || ( attributes.length == 1 && attributes[0].nodeName != '_cke_expando' ) );
     853                                        var attrs = this.$.attributes,
     854                                                attrsNum = attrs.length;
     855
     856                                        // The _moz_dirty attribute might get into the element after pasting (#5455)
     857                                        var execludeAttrs = { _cke_expando : 1, _moz_dirty : 1 };
     858
     859                                        return attrsNum > 0 &&
     860                                                ( attrsNum > 2 ||
     861                                                        !execludeAttrs[ attrs[0].nodeName ] ||
     862                                                        ( attrsNum == 2 && !execludeAttrs[ attrs[1].nodeName ] ) );
    855863                                },
    856864
    857865                /**
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy