Ticket #3789: 3789_2.patch
File 3789_2.patch, 2.1 KB (added by , 14 years ago) |
---|
-
_source/plugins/htmldataprocessor/plugin.js
91 91 for ( i in blockLikeTags ) 92 92 defaultDataBlockFilterRules.elements[ i ] = extendBlockForDisplay; 93 93 94 /**95 * IE sucks with dynamic 'name' attribute after element is created, '_cke_saved_name' is used instead for this attribute.96 */97 var removeName = function( element )98 {99 var attribs = element.attributes;100 101 if ( attribs._cke_saved_name )102 delete attribs.name;103 };104 105 94 var defaultHtmlFilterRules = 106 95 { 107 96 elementNames : … … 124 113 125 114 elements : 126 115 { 116 $ : function( element ) 117 { 118 // Remove duplicated attributes - #3789. 119 var attribs = element.attributes; 120 121 if ( attribs ) 122 { 123 // IE sucks with dynamic 'name' attribute after element is created, '_cke_saved_name' is used instead for this attribute. 124 if ( attribs._cke_saved_name ) 125 delete attribs.name; 126 if ( attribs._cke_saved_href ) 127 delete attribs.href; 128 if ( attribs._cke_saved_src ) 129 delete attribs.src; 130 } 131 }, 132 127 133 embed : function( element ) 128 134 { 129 135 var parent = element.parent; … … 135 141 element.attributes.width = parent.attributes.width; 136 142 element.attributes.height = parent.attributes.height; 137 143 } 138 }, 139 140 img : function( element ) 141 { 142 var attribs = element.attributes; 143 144 if ( attribs._cke_saved_name ) 145 delete attribs.name; 146 if ( attribs._cke_saved_src ) 147 delete attribs.src; 148 }, 149 150 a : function( element ) 151 { 152 var attribs = element.attributes; 153 154 if ( attribs._cke_saved_name ) 155 delete attribs.name; 156 if ( attribs._cke_saved_href ) 157 delete attribs.href; 158 }, 159 160 input : removeName, 161 textarea : removeName, 162 select : removeName, 163 form : removeName 144 } 164 145 }, 165 146 166 147 attributes :