Ticket #4522: 4522.patch

File 4522.patch, 1.0 KB (added by Garry Yao, 15 years ago)
  • _source/plugins/undo/plugin.js

     
    130130                        this.contents = this.contents.replace( /\s+_cke_expando=".*?"/g, '' );
    131131        }
    132132
     133        // Attributes whose value will change on html manipulation.
     134        var unstableAttrs = /(?: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                        // IE6/7 mangled some of the attribute values, ignore them on comparison.(#4522)
     144                        if( CKEDITOR.env.ie && !CKEDITOR.env.ie8 )
     145                        {
     146                                thisContents = thisContents.replace( unstableAttrs, '' ),
     147                                otherContents = otherContents.replace( unstableAttrs, '' );
     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