src/Forms/HTMLEditor/HTMLEditorSanitiser.php
protected function getRuleForAttribute($elementRule, $name)
    {
        if (isset($elementRule->attributes[$name])) {
            return $elementRule->attributes[$name];
        }
        foreach ($elementRule->attributePatterns as $attribute) {
            if (preg_match($attribute->pattern, $name)) {
                return $attribute;
            }
        }
        return null;
    }
protected function getRuleForAttribute($elementRule, $name)
    {
        if (isset($elementRule->attributes[$name])) {
            return $elementRule->attributes[$name];
        }
        foreach ($elementRule->attributePatterns as $attribute) {
            if (preg_match($attribute->pattern, $name)) {
                return $attribute;
            }
        }
        return null;
    }
protected function getRuleForAttribute ( $ elementRule , $ name ) { if ( isset ( $ elementRule -> attributes [ $ name ] ) ) { return $ elementRule -> attributes [ $ name ] ; } foreach ( $ elementRule -> attributePatterns as $ attribute ) { if ( preg_match ( $ attribute -> pattern , $ name ) ) { return $ attribute ; } } return null ; }
Given an attribute name, return the rule structure for that attribute

@param object $elementRule
@param string $name The attribute name
@return stdClass The attribute rule
Given an attribute name return the rule structure for that attribute