Ticket #6116: 6116.patch

File 6116.patch, 1.3 KB (added by Sa'ar Zac Elias, 14 years ago)
  • _source/plugins/htmldataprocessor/plugin.js

     
    132132                                                if ( attribs.cke_temp )
    133133                                                        return false;
    134134
    135                                                 // Remove duplicated attributes - #3789.
    136                                                 var attributeNames = [ 'name', 'href', 'src' ],
     135                                                // Remove duplicated attributes (#3789).
     136                                                // Also protect the contentEditable attribute so it won't get lost by our modifications (#6116).
     137                                                var attributeNames = [ 'name', 'href', 'src', 'contenteditable' ],
    137138                                                        savedAttributeName;
    138139                                                for ( var i = 0 ; i < attributeNames.length ; i++ )
    139140                                                {
     
    263264                defaultHtmlFilterRules.elements[ i ] = unprotectReadyOnly;
    264265        }
    265266
    266         var protectAttributeRegex = /<(?:a|area|img|input)[\s\S]*?\s((?:href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+)))/gi;
     267        var protectAttributeRegex = /<(?:a|area|img|input|textarea)[\s\S]*?\s((?:href|src|name|contenteditable)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+)))/gi;
    267268
    268269        var protectElementsRegex = /(?:<style(?=[ >])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,
    269270                encodedElementsRegex = /<cke:encoded>([^<]*)<\/cke:encoded>/gi;
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy