public/ckeditor/4.4dev/core/htmlparser/filter.js
function( context, currentValue ) {
			var isNode = currentValue instanceof CKEDITOR.htmlParser.node || currentValue instanceof CKEDITOR.htmlParser.fragment,
				// Splice '1' to remove context, which we don't want to pass to filter rules.
				args = Array.prototype.slice.call( arguments, 1 ),
				rules = this.rules,
				len = rules.length,
				orgType, orgName, ret, i, rule;

			for ( i = 0; i < len; i++ ) {
				// Backup the node info before filtering.
				if ( isNode ) {
					orgType = currentValue.type;
					orgName = currentValue.name;
				}

				rule = rules[ i ];
				if ( isRuleApplicable( context, rule ) ) {
					ret = rule.value.apply( null, args );

					if ( ret === false )
						return ret;

					// We're filtering node (element/fragment).
					// No further filtering if it's not anymore fitable for the subsequent filters.
					if ( isNode && ret && ( ret.name != orgName || ret.type != orgType ) )
						return ret;

					// Update currentValue and corresponding argument in args array.
					// Updated values will be used in next for-loop step.
					if ( ret != null )
						args[ 0 ] = currentValue = ret;

					// ret == undefined will continue loop as nothing has happened.
				}
			}

			return currentValue;
		}
function( context, currentValue ) {
			var isNode = currentValue instanceof CKEDITOR.htmlParser.node || currentValue instanceof CKEDITOR.htmlParser.fragment,
				// Splice '1' to remove context, which we don't want to pass to filter rules.
				args = Array.prototype.slice.call( arguments, 1 ),
				rules = this.rules,
				len = rules.length,
				orgType, orgName, ret, i, rule;

			for ( i = 0; i < len; i++ ) {
				// Backup the node info before filtering.
				if ( isNode ) {
					orgType = currentValue.type;
					orgName = currentValue.name;
				}

				rule = rules[ i ];
				if ( isRuleApplicable( context, rule ) ) {
					ret = rule.value.apply( null, args );

					if ( ret === false )
						return ret;

					// We're filtering node (element/fragment).
					// No further filtering if it's not anymore fitable for the subsequent filters.
					if ( isNode && ret && ( ret.name != orgName || ret.type != orgType ) )
						return ret;

					// Update currentValue and corresponding argument in args array.
					// Updated values will be used in next for-loop step.
					if ( ret != null )
						args[ 0 ] = currentValue = ret;

					// ret == undefined will continue loop as nothing has happened.
				}
			}

			return currentValue;
		}
function ( context , currentValue ) { var isNode = currentValue instanceof CKEDITOR . htmlParser . node || currentValue instanceof CKEDITOR . htmlParser . fragment , // Splice '1' to remove context, which we don't want to pass to filter rules. args = Array . prototype . slice . call ( arguments , 1 ) , rules = this . rules , len = rules . length , orgType , orgName , ret , i , rule ; for ( i = 0 ; i < len ; i ++ ) { // Backup the node info before filtering. if ( isNode ) { orgType = currentValue . type ; orgName = currentValue . name ; } rule = rules [ i ] ; if ( isRuleApplicable ( context , rule ) ) { ret = rule . value . apply ( null , args ) ; if ( ret === false ) return ret ; // We're filtering node (element/fragment). // No further filtering if it's not anymore fitable for the subsequent filters. if ( isNode && ret && ( ret . name != orgName || ret . type != orgType ) ) return ret ; // Update currentValue and corresponding argument in args array. // Updated values will be used in next for-loop step. if ( ret != null ) args [ 0 ] = currentValue = ret ; // ret == undefined will continue loop as nothing has happened. } } return currentValue ; }
Executes this rules group on given value. Applicable only if function based rules were added.

All arguments passed to this function will be forwarded to rules' functions.

@param {CKEDITOR.htmlParser.node/CKEDITOR.htmlParser.fragment/String} currentValue The value to be filtered.
@returns {CKEDITOR.htmlParser.node/CKEDITOR.htmlParser.fragment/String} Filtered value.
Executes this rules group on given value . Applicable only if function based rules were added .