Ticket #7243: 7243.patch
File 7243.patch, 2.2 KB (added by , 13 years ago) |
---|
-
_source/plugins/htmldataprocessor/plugin.js
44 44 typeof extendEmptyBlock == 'function' && ( extendEmptyBlock( block ) === false ) ) ) 45 45 return false; 46 46 47 48 49 50 51 52 53 54 47 // 1. For IE version >=8, empty blocks are displayed correctly themself in wysiwiyg; 48 // 2. For the rest, at least table cell and list item need no filler space. 49 // (#6248) 50 if ( fromSource && CKEDITOR.env.ie && 51 ( document.documentMode > 7 52 || block.name in CKEDITOR.dtd.tr 53 || block.name in CKEDITOR.dtd.$listItem ) ) 54 return false; 55 55 56 56 var lastChild = lastNoneSpaceChild( block ); 57 57 … … 289 289 } 290 290 291 291 var protectElementRegex = /<(a|area|img|input)\b([^>]*)>/gi, 292 protectAttributeRegex = /\b( href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi;292 protectAttributeRegex = /\b(on\w+|href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi; 293 293 294 294 var protectElementsRegex = /(?:<style(?=[ >])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi, 295 295 encodedElementsRegex = /<cke:encoded>([^<]*)<\/cke:encoded>/gi; … … 305 305 { 306 306 return '<' + tag + attributes.replace( protectAttributeRegex, function( fullAttr, attrName ) 307 307 { 308 // Avoid corrupting the inline event attributes (#7243). 308 309 // We should not rewrite the existed protected attributes, e.g. clipboard content from editor. (#5218) 309 if ( attributes.indexOf( 'data-cke-saved-' + attrName ) == -1 )310 if ( !/^on/.test( attrName ) && attributes.indexOf( 'data-cke-saved-' + attrName ) == -1 ) 310 311 return ' data-cke-saved-' + fullAttr + ' ' + fullAttr; 311 312 312 313 return fullAttr;