Ticket #5617: 5617_3.patch
File 5617_3.patch, 1.7 KB (added by , 15 years ago) |
---|
-
_source/core/htmlparser/filter.js
227 227 } 228 228 } 229 229 230 // Invoke filters sequentially on the array, break the iteration 231 // when it doesn't make sense to continue anymore. 230 232 function callItems( currentEntry ) 231 233 { 232 var isObject = ( typeof currentEntry == 'object' ); 234 var isNode = currentEntry.type 235 || currentEntry instanceof CKEDITOR.htmlParser.fragment; 233 236 234 237 for ( var i = 0 ; i < this.length ; i++ ) 235 238 { 239 // Backup the node info before filtering. 240 if ( isNode ) 241 { 242 var orgType = currentEntry.type, 243 orgName = currentEntry.name; 244 } 245 236 246 var item = this[ i ], 237 247 ret = item.apply( window, arguments ); 238 248 239 if ( typeof ret != 'undefined' ) 240 { 241 if ( ret === false ) 242 return false; 249 if ( ret === false ) 250 return ret; 243 251 244 if ( isObject && ret != currentEntry ) 252 // We're filtering node (element/fragment). 253 if ( isNode ) 254 { 255 // No further filtering if it's not anymore 256 // fitable for the subsequent filters. 257 if ( ret && ( ret.name != orgName 258 || ret.type != orgType ) ) 259 { 245 260 return ret; 246 } 247 } 261 } 262 } 263 // Filtering value (nodeName/textValue/attrValue). 264 else 265 { 266 // No further filtering if it's not 267 // any more values. 268 if ( typeof ret != 'string' ) 269 return ret; 270 } 248 271 249 return null; 250 } 272 ret != undefined && ( currentEntry = ret ); 273 } 274 275 return currentEntry; 276 } 251 277 })(); 252 278 253 279 // "entities" plugin