Skip to content
Permalink
Browse files

Merge branch 't/10298'

  • Loading branch information...
oleq committed May 29, 2013
2 parents e17fb2e + c451e34 commit 8ad21b6f32702a505781aad407255dce59ca07de
Showing with 5 additions and 2 deletions.
  1. +1 −0 CHANGES.md
  2. +4 −2 core/htmldataprocessor.js
@@ -10,6 +10,7 @@ CKEditor 4 Changelog
* [#10367](http://dev.ckeditor.com/ticket/10367): Fixed: editable#insertText loses characters if RegExp replace controls are inserted.
* [#10146](http://dev.ckeditor.com/ticket/10146): [Firefox] Empty lines are being removed while config#enterMode is ENTER_BR.
* [#6504](http://dev.ckeditor.com/ticket/6504): Resolved race condition while loading several customConfig files.
* [#10298](http://dev.ckeditor.com/ticket/10298): Data processor breaks attributes containing protected parts.

## CKEditor 4.1.1

@@ -658,7 +658,7 @@
}

var protectElementRegex = /<(a|area|img|input|source)\b([^>]*)>/gi,
protectAttributeRegex = /\b(on\w+|href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi;
protectAttributeRegex = /\s(on\w+|href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi;

// Note: we use lazy star '*?' to prevent eating everything up to the last occurrence of </style> or </textarea>.
var protectElementsRegex = /(?:<style(?=[ >])[^>]*>[\s\S]*?<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,
@@ -675,8 +675,10 @@
return '<' + tag + attributes.replace( protectAttributeRegex, function( fullAttr, attrName ) {
// Avoid corrupting the inline event attributes (#7243).
// We should not rewrite the existed protected attributes, e.g. clipboard content from editor. (#5218)
if ( !( /^on/ ).test( attrName ) && attributes.indexOf( 'data-cke-saved-' + attrName ) == -1 )
if ( !( /^on/ ).test( attrName ) && attributes.indexOf( 'data-cke-saved-' + attrName ) == -1 ) {
fullAttr = fullAttr.slice( 1 ); // Strip the space.
return ' data-cke-saved-' + fullAttr + ' data-cke-' + CKEDITOR.rnd + '-' + fullAttr;
}

return fullAttr;
}) + '>';

0 comments on commit 8ad21b6

Please sign in to comment.
You can’t perform that action at this time.