/*\r
-Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.\r
+Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.\r
For licensing, see LICENSE.html or http://ckeditor.com/license\r
*/\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 ( !( /^on/ ).test( attrName ) && attributes.indexOf( 'data-cke-saved-' + attrName ) == -1 )\r
- return ' data-cke-saved-' + fullAttr + ' ' + fullAttr;\r
+ return ' data-cke-saved-' + fullAttr + ' data-cke-' + CKEDITOR.rnd + '-' + fullAttr;\r
\r
return fullAttr;\r
}) + '>';\r
// Call the browser to help us fixing a possibly invalid HTML\r
// structure.\r
var div = new CKEDITOR.dom.element( 'div' );\r
+\r
// Add fake character to workaround IE comments bug. (#3801)\r
div.setHtml( 'a' + data );\r
data = div.getHtml().substr( 1 );\r
\r
+ // Restore shortly protected attribute names.\r
+ data = data.replace( new RegExp( ' data-cke-' + CKEDITOR.rnd + '-', 'ig' ), ' ' );\r
+\r
// Unprotect "some" of the protected elements at this point.\r
data = unprotectElementNames( data );\r
\r