Ticket #4522: 4522_2.patch

File 4522_2.patch, 922 bytes (added by Garry Yao, 14 years ago)
  • _source/plugins/undo/plugin.js

     
    130130                        this.contents = this.contents.replace( /\s+_cke_expando=".*?"/g, '' );
    131131        }
    132132
     133        // Attributes that browser may changing them when setting via innerHTML.
     134        var protectedAttrs = /\s(?:href|src|name)="[^"]*?"/gi;
     135
    133136        Image.prototype =
    134137        {
    135138                equals : function( otherImage, contentOnly )
    136139                {
    137                         if ( this.contents != otherImage.contents )
     140                        var thisContents = this.contents,
     141                                otherContents = otherImage.contents;
     142
     143                        // Comparing only the protected attribute values but not the original ones.(#4522)
     144                        if ( thisContents.replace( protectedAttrs, '' ) != otherContents.replace( protectedAttrs, '' ) )
    138145                                return false;
    139146
    140147                        if ( contentOnly )
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy