Ticket #5528: 5528.patch
File 5528.patch, 1.6 KB (added by , 15 years ago) |
---|
-
plugins/htmldataprocessor/plugin.js
132 132 return false; 133 133 134 134 // Remove duplicated attributes - #3789. 135 var attributeNames = [ 'name', 'href', 'src' ],135 var attributeNames = [ 'name', 'href', 'src', 'style' ], 136 136 savedAttributeName; 137 137 for ( var i = 0 ; i < attributeNames.length ; i++ ) 138 138 { … … 230 230 for ( i in blockLikeTags ) 231 231 defaultHtmlBlockFilterRules.elements[ i ] = extendBlockForOutput; 232 232 233 if ( CKEDITOR.env.ie )234 {235 // IE outputs style attribute in capital letters. We should convert236 // them back to lower case.237 defaultHtmlFilterRules.attributes.style = function( value, element )238 {239 return value.toLowerCase();240 };241 }242 243 233 var protectAttributeRegex = /<(?:a|area|img|input)[\s\S]*?\s((?:href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+)))/gi; 234 var protectStyleRegex = /\s(style\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+)))/gi; 244 235 245 236 var protectElementsRegex = /(?:<style(?=[ >])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi, 246 237 encodedElementsRegex = /<cke:encoded>([^<]*)<\/cke:encoded>/gi; … … 252 243 253 244 function protectAttributes( html ) 254 245 { 255 return html.replace( protectAttributeRegex, '$& _cke_saved_$1' ) ;246 return html.replace( protectAttributeRegex, '$& _cke_saved_$1' ).replace( protectStyleRegex, '$& _cke_saved_$1' ); 256 247 } 257 248 258 249 function protectElements( html )