Ticket #2962: 2962_2.patch
File 2962_2.patch, 2.5 KB (added by , 14 years ago) |
---|
-
_source/plugins/link/dialogs/link.js
128 128 // IE BUG: target attribute is an empty string instead of null in IE if it's not set. 129 129 if ( !target ) 130 130 { 131 var onclick = element.getAttribute( '_cke_ saved_onclick' ) || element.getAttribute( 'onclick' ),131 var onclick = element.getAttribute( '_cke_pa_onclick' ) || element.getAttribute( 'onclick' ), 132 132 onclickMatch = onclick && onclick.match( popupRegex ); 133 133 if ( onclickMatch ) 134 134 { … … 1057 1057 addFeature( 'top' ); 1058 1058 1059 1059 onclickList.push( featureList.join( ',' ), '\'); return false;' ); 1060 attributes ._cke_saved_onclick= onclickList.join( '' );1060 attributes[ CKEDITOR.env.ie || CKEDITOR.env.webkit ? '_cke_pa_onclick' : 'onclick' ] = onclickList.join( '' ); 1061 1061 } 1062 1062 else 1063 1063 { 1064 1064 if ( data.target.type != 'notSet' && data.target.name ) 1065 1065 attributes.target = data.target.name; 1066 removeAttributes.push( '_cke_ saved_onclick', 'onclick' );1066 removeAttributes.push( '_cke_pa_onclick', 'onclick' ); 1067 1067 } 1068 1068 } 1069 1069 -
_source/core/htmlparser/element.js
67 67 }; 68 68 69 69 var ckeAttrRegex = /^_cke/, 70 ckeClassRegex = /(^|\s+)cke_[^\s]*/g; 70 ckeClassRegex = /(^|\s+)cke_[^\s]*/g, 71 ckePrivateAttrRegex = /^_cke_pa_/; 71 72 72 73 CKEDITOR.htmlParser.element.prototype = 73 74 { … … 132 133 var attribsArray = []; 133 134 for ( var a in attributes ) 134 135 { 136 var value = attributes[ a ]; 137 138 // If the attribute name is _cke_pa_*, strip away the _cke_pa part. 139 a = a.replace( ckePrivateAttrRegex, '' ); 140 135 141 // Ignore all attributes starting with "_cke". 136 142 if ( ckeAttrRegex.test( a ) ) 137 143 continue; … … 139 145 // Ignore all cke_* CSS classes. 140 146 if ( a.toLowerCase() == 'class' ) 141 147 { 142 this.attributes[ a ] = CKEDITOR.tools.ltrim( this.attributes[ a ].replace( ckeClassRegex, '' ) );143 if ( this.attributes[ a ]== '' )148 value = CKEDITOR.tools.ltrim( value.replace( ckeClassRegex, '' ) ); 149 if ( value == '' ) 144 150 continue; 145 151 } 146 152 147 attribsArray.push( [ a, this.attributes[ a ]] );153 attribsArray.push( [ a, value ] ); 148 154 } 149 155 150 156 // Sort the attributes by name.