src/Forms/HTMLEditor/HTMLEditorSanitiser.php
protected function getRuleForElement($tag)
    {
        if (isset($this->elements[$tag])) {
            return $this->elements[$tag];
        }
        foreach ($this->elementPatterns as $element) {
            if (preg_match($element->pattern, $tag)) {
                return $element;
            }
        }
        return null;
    }
protected function getRuleForElement($tag)
    {
        if (isset($this->elements[$tag])) {
            return $this->elements[$tag];
        }
        foreach ($this->elementPatterns as $element) {
            if (preg_match($element->pattern, $tag)) {
                return $element;
            }
        }
        return null;
    }
protected function getRuleForElement ( $ tag ) { if ( isset ( $ this -> elements [ $ tag ] ) ) { return $ this -> elements [ $ tag ] ; } foreach ( $ this -> elementPatterns as $ element ) { if ( preg_match ( $ element -> pattern , $ tag ) ) { return $ element ; } } return null ; }
Given an element tag, return the rule structure for that element
@param string $tag The element tag
@return stdClass The element rule
Given an element tag return the rule structure for that element