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 #
- $element
-
(Required) The node for which to remove the attribute.
- $attribute
-
(Required) The attribute to remove from the element.
- $validation_error
-
(Optional) Validation error details.
Default value:array()
- $attr_spec
-
(Optional) Attribute spec.
Default value:array()