Skip to content
Permalink
Browse files

Merge branch 't/11223'

  • Loading branch information...
mlewand committed May 5, 2014
2 parents d8b7fc9 + eddb359 commit 90da227a3990d47b3017ce1a41009fa69243fb77
Showing with 11 additions and 2 deletions.
  1. +1 −0 CHANGES.md
  2. +10 −2 core/htmldataprocessor.js
@@ -5,6 +5,7 @@ CKEditor 4 Changelog

Fixed Issues:

* [#11223](http://dev.ckeditor.com/ticket/11223): Fixeed issue when [Protected Source](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-protectedSource) was not working in the title element.
* [#11859](http://dev.ckeditor.com/ticket/11859): Fixed: Removed [Source Dialog](http://ckeditor.com/addon/sourcedialog) plugin from required in [Code Snippet](http://ckeditor.com/addon/codesnippet) sample.
* [#11754](http://dev.ckeditor.com/ticket/11754): Fixed: Infinite loop in Google Chrome when contents contains not closed attributes.
* [#11848](http://dev.ckeditor.com/ticket/11848): Fixed: [`editor.insertElement()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertElement) throwing an exception in IE, when there was no selection in editor.
@@ -894,12 +894,21 @@
// Different protection pattern is used for those that
// live in attributes to avoid from being HTML encoded.
// Why so serious? See #9205, #8216, #7805, #11754, #11846.
return data.replace( /<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=>]+))+\s*>/g, function( match ) {
data = data.replace( /<\w+(?:\s+(?:(?:[^\s=>]+\s*=\s*(?:[^'"\s>]+|'[^']*'|"[^"]*"))|[^\s=>]+))+\s*>/g, function( match ) {
return match.replace( /<!--\{cke_protected\}([^>]*)-->/g, function( match, data ) {
store[ store.id ] = decodeURIComponent( data );
return '{cke_protected_' + ( store.id++ ) + '}';
} );
} );

// This RegExp searches for innerText in all the title/iframe/textarea elements.
// This is because browser doesn't allow HTML in these elements, that's why we can't
// nest comments in there. (#11223)
data = data.replace( /<(title|iframe|textarea)([^>]*)>([\s\S]*?)<\/\1>/g, function( match, tagName, tagAttributes, innerText ) {
return '<' + tagName + tagAttributes + '>' + unprotectSource( unprotectRealComments( innerText ), editor ) + '</' + tagName + '>';
} );

return data;
}
} )();

@@ -997,4 +1006,3 @@
* @param {Boolean} data.filter See {@link CKEDITOR.htmlDataProcessor#toDataFormat} The `filter` argument.
* @param {Boolean} data.enterMode See {@link CKEDITOR.htmlDataProcessor#toDataFormat} The `enterMode` argument.
*/

0 comments on commit 90da227

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.