typeof extendEmptyBlock == 'function' && ( extendEmptyBlock( block ) === false ) ) )\r
return false;\r
\r
- // 1. For IE version >=8, empty blocks are displayed correctly themself in wysiwiyg;\r
- // 2. For the rest, at least table cell and list item need no filler space.\r
- // (#6248)\r
- if ( fromSource && CKEDITOR.env.ie &&\r
- ( document.documentMode > 7\r
- || block.name in CKEDITOR.dtd.tr\r
- || block.name in CKEDITOR.dtd.$listItem ) )\r
- return false;\r
+ // 1. For IE version >=8, empty blocks are displayed correctly themself in wysiwiyg;\r
+ // 2. For the rest, at least table cell and list item need no filler space.\r
+ // (#6248)\r
+ if ( fromSource && CKEDITOR.env.ie &&\r
+ ( document.documentMode > 7\r
+ || block.name in CKEDITOR.dtd.tr\r
+ || block.name in CKEDITOR.dtd.$listItem ) )\r
+ return false;\r
\r
var lastChild = lastNoneSpaceChild( block );\r
\r
}\r
\r
var protectElementRegex = /<(a|area|img|input)\b([^>]*)>/gi,\r
- protectAttributeRegex = /\b(href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi;\r
+ protectAttributeRegex = /\b(on\w+|href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi;\r
\r
var protectElementsRegex = /(?:<style(?=[ >])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,\r
encodedElementsRegex = /<cke:encoded>([^<]*)<\/cke:encoded>/gi;\r
{\r
return '<' + tag + attributes.replace( protectAttributeRegex, function( fullAttr, attrName )\r
{\r
+ // Avoid corrupting the inline event attributes (#7243).\r
// We should not rewrite the existed protected attributes, e.g. clipboard content from editor. (#5218)\r
- if ( attributes.indexOf( 'data-cke-saved-' + attrName ) == -1 )\r
+ if ( !( /^on/ ).test( attrName ) && attributes.indexOf( 'data-cke-saved-' + attrName ) == -1 )\r
return ' data-cke-saved-' + fullAttr + ' ' + fullAttr;\r
\r
return fullAttr;\r