AMP_Base_Sanitizer::remove_invalid_attribute( DOMElement $element,  DOMAttr|string $attribute,  array $validation_error = array(),  array $attr_spec = array() )

Description #

Removes an invalid attribute of a node.

Also, calls the mutation callback for it. This tracks all the attributes that were removed.

Parameters #


(DOMElement) (Required) The node for which to remove the attribute.


(DOMAttr|string) (Required) The attribute to remove from the element.


(array) (Optional) Validation error details.

Default value:array()


(array) (Optional) Attribute spec.

Default value:array()

Return #

(bool) Whether the node should have been removed, that is, that the node was sanitized for validity.

Changelog #

Version Description
0.7 Introduced.