Index: /CKEditor/trunk/_source/core/htmlparser/element.js
===================================================================
--- /CKEditor/trunk/_source/core/htmlparser/element.js (revision 3107)
+++ /CKEditor/trunk/_source/core/htmlparser/element.js (revision 3108)
@@ -73,5 +73,6 @@
var ckeAttrRegex = /^_cke/,
- ckeClassRegex = /(^|\s+)cke_[^\s]*/g;
+ ckeClassRegex = /(?:^|\s+)cke_[^\s]*/g,
+ ckePrivateAttrRegex = /^_cke_pa_/;
CKEDITOR.htmlParser.element.prototype =
@@ -138,4 +139,9 @@
for ( var a in attributes )
{
+ var value = attributes[ a ];
+
+ // If the attribute name is _cke_pa_*, strip away the _cke_pa part.
+ a = a.replace( ckePrivateAttrRegex, '' );
+
// Ignore all attributes starting with "_cke".
if ( ckeAttrRegex.test( a ) )
@@ -145,10 +151,10 @@
if ( a.toLowerCase() == 'class' )
{
- this.attributes[ a ] = CKEDITOR.tools.ltrim( this.attributes[ a ].replace( ckeClassRegex, '' ) );
- if ( this.attributes[ a ] == '' )
+ value = CKEDITOR.tools.ltrim( value.replace( ckeClassRegex, '' ) );
+ if ( value == '' )
continue;
}
- attribsArray.push( [ a, this.attributes[ a ] ] );
+ attribsArray.push( [ a, value ] );
}
Index: /CKEditor/trunk/_source/plugins/link/dialogs/link.js
===================================================================
--- /CKEditor/trunk/_source/plugins/link/dialogs/link.js (revision 3107)
+++ /CKEditor/trunk/_source/plugins/link/dialogs/link.js (revision 3108)
@@ -129,5 +129,5 @@
if ( !target )
{
- var onclick = element.getAttribute( '_cke_saved_onclick' ) || element.getAttribute( 'onclick' ),
+ var onclick = element.getAttribute( '_cke_pa_onclick' ) || element.getAttribute( 'onclick' ),
onclickMatch = onclick && onclick.match( popupRegex );
if ( onclickMatch )
@@ -1058,5 +1058,5 @@
onclickList.push( featureList.join( ',' ), '\'); return false;' );
- attributes._cke_saved_onclick = onclickList.join( '' );
+ attributes[ CKEDITOR.env.ie || CKEDITOR.env.webkit ? '_cke_pa_onclick' : 'onclick' ] = onclickList.join( '' );
}
else
@@ -1064,5 +1064,5 @@
if ( data.target.type != 'notSet' && data.target.name )
attributes.target = data.target.name;
- removeAttributes.push( '_cke_saved_onclick', 'onclick' );
+ removeAttributes.push( '_cke_pa_onclick', 'onclick' );
}
}