public/ckeditor/4.4dev/core/htmlparser/element.js
function( filter, context ) {
			var element = this,
				originalName, name;

			context = element.getFilterContext( context );

			// Do not process elements with data-cke-processor attribute set to off.
			if ( context.off )
				return true;

			// Filtering if it's the root node.
			if ( !element.parent )
				filter.onRoot( context, element );

			while ( true ) {
				originalName = element.name;

				if ( !( name = filter.onElementName( context, originalName ) ) ) {
					this.remove();
					return false;
				}

				element.name = name;

				if ( !( element = filter.onElement( context, element ) ) ) {
					this.remove();
					return false;
				}

				// New element has been returned - replace current one
				// and process it (stop processing this and return false, what
				// means that element has been removed).
				if ( element !== this ) {
					this.replaceWith( element );
					return false;
				}

				// If name has been changed - continue loop, so in next iteration
				// filters for new name will be applied to this element.
				// If name hasn't been changed - stop.
				if ( element.name == originalName )
					break;

				// If element has been replaced with something of a
				// different type, then make the replacement filter itself.
				if ( element.type != CKEDITOR.NODE_ELEMENT ) {
					this.replaceWith( element );
					return false;
				}

				// This indicate that the element has been dropped by
				// filter but not the children.
				if ( !element.name ) {
					this.replaceWithChildren();
					return false;
				}
			}

			var attributes = element.attributes,
				a, value, newAttrName;

			for ( a in attributes ) {
				newAttrName = a;
				value = attributes[ a ];

				// Loop until name isn't modified.
				// A little bit senseless, but IE would do that anyway
				// because it iterates with for-in loop even over properties
				// created during its run.
				while ( true ) {
					if ( !( newAttrName = filter.onAttributeName( context, a ) ) ) {
						delete attributes[ a ];
						break;
					} else if ( newAttrName != a ) {
						delete attributes[ a ];
						a = newAttrName;
						continue;
					} else {
						break;
					}
				}

				if ( newAttrName ) {
					if ( ( value = filter.onAttribute( context, element, newAttrName, value ) ) === false )
						delete attributes[ newAttrName ];
					else
						attributes[ newAttrName ] = value;
				}
			}

			if ( !element.isEmpty )
				this.filterChildren( filter, false, context );

			return true;
		}
function( filter, context ) {
			var element = this,
				originalName, name;

			context = element.getFilterContext( context );

			// Do not process elements with data-cke-processor attribute set to off.
			if ( context.off )
				return true;

			// Filtering if it's the root node.
			if ( !element.parent )
				filter.onRoot( context, element );

			while ( true ) {
				originalName = element.name;

				if ( !( name = filter.onElementName( context, originalName ) ) ) {
					this.remove();
					return false;
				}

				element.name = name;

				if ( !( element = filter.onElement( context, element ) ) ) {
					this.remove();
					return false;
				}

				// New element has been returned - replace current one
				// and process it (stop processing this and return false, what
				// means that element has been removed).
				if ( element !== this ) {
					this.replaceWith( element );
					return false;
				}

				// If name has been changed - continue loop, so in next iteration
				// filters for new name will be applied to this element.
				// If name hasn't been changed - stop.
				if ( element.name == originalName )
					break;

				// If element has been replaced with something of a
				// different type, then make the replacement filter itself.
				if ( element.type != CKEDITOR.NODE_ELEMENT ) {
					this.replaceWith( element );
					return false;
				}

				// This indicate that the element has been dropped by
				// filter but not the children.
				if ( !element.name ) {
					this.replaceWithChildren();
					return false;
				}
			}

			var attributes = element.attributes,
				a, value, newAttrName;

			for ( a in attributes ) {
				newAttrName = a;
				value = attributes[ a ];

				// Loop until name isn't modified.
				// A little bit senseless, but IE would do that anyway
				// because it iterates with for-in loop even over properties
				// created during its run.
				while ( true ) {
					if ( !( newAttrName = filter.onAttributeName( context, a ) ) ) {
						delete attributes[ a ];
						break;
					} else if ( newAttrName != a ) {
						delete attributes[ a ];
						a = newAttrName;
						continue;
					} else {
						break;
					}
				}

				if ( newAttrName ) {
					if ( ( value = filter.onAttribute( context, element, newAttrName, value ) ) === false )
						delete attributes[ newAttrName ];
					else
						attributes[ newAttrName ] = value;
				}
			}

			if ( !element.isEmpty )
				this.filterChildren( filter, false, context );

			return true;
		}
function ( filter , context ) { var element = this , originalName , name ; context = element . getFilterContext ( context ) ; // Do not process elements with data-cke-processor attribute set to off. if ( context . off ) return true ; // Filtering if it's the root node. if ( ! element . parent ) filter . onRoot ( context , element ) ; while ( true ) { originalName = element . name ; if ( ! ( name = filter . onElementName ( context , originalName ) ) ) { this . remove ( ) ; return false ; } element . name = name ; if ( ! ( element = filter . onElement ( context , element ) ) ) { this . remove ( ) ; return false ; } // New element has been returned - replace current one // and process it (stop processing this and return false, what // means that element has been removed). if ( element !== this ) { this . replaceWith ( element ) ; return false ; } // If name has been changed - continue loop, so in next iteration // filters for new name will be applied to this element. // If name hasn't been changed - stop. if ( element . name == originalName ) break ; // If element has been replaced with something of a // different type, then make the replacement filter itself. if ( element . type != CKEDITOR . NODE_ELEMENT ) { this . replaceWith ( element ) ; return false ; } // This indicate that the element has been dropped by // filter but not the children. if ( ! element . name ) { this . replaceWithChildren ( ) ; return false ; } } var attributes = element . attributes , a , value , newAttrName ; for ( a in attributes ) { newAttrName = a ; value = attributes [ a ] ; // Loop until name isn't modified. // A little bit senseless, but IE would do that anyway // because it iterates with for-in loop even over properties // created during its run. while ( true ) { if ( ! ( newAttrName = filter . onAttributeName ( context , a ) ) ) { delete attributes [ a ] ; break ; } else if ( newAttrName != a ) { delete attributes [ a ] ; a = newAttrName ; continue ; } else { break ; } } if ( newAttrName ) { if ( ( value = filter . onAttribute ( context , element , newAttrName , value ) ) === false ) delete attributes [ newAttrName ] ; else attributes [ newAttrName ] = value ; } } if ( ! element . isEmpty ) this . filterChildren ( filter , false , context ) ; return true ; }
Filters this element and its children with the given filter.

@since 4.1
@param {CKEDITOR.htmlParser.filter} filter
@returns {Boolean} The method returns `false` when this element has
been removed or replaced with another. This information means that
{@link #filterChildren} has to repeat the filter on the current
position in parent's children array.
Filters this element and its children with the given filter .