Ticket #4522: 4522_3.patch

File 4522_3.patch, 1.1 KB (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 = /\b(?: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                        // For IE6/7 : Comparing only the protected attribute values but not the original ones.(#4522)
     144                        if( CKEDITOR.env.ie && ( CKEDITOR.env.ie7Compat || CKEDITOR.env.ie6Compat ) )
     145                        {
     146                                thisContents = thisContents.replace( protectedAttrs, '' );
     147                                otherContents = otherContents.replace( protectedAttrs, '' );
     148                        }
     149
     150                        if( thisContents != otherContents )
    138151                                return false;
    139152
    140153                        if ( contentOnly )
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy