AMP_Base_Sanitizer::remove_invalid_child

AMP_Base_Sanitizer::remove_invalid_child( DOMNode|DOMElement $node,  array $validation_error = array() )

Description #

Removes an invalid child of a node.

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


Parameters #

$node

(DOMNode|DOMElement) (Required) The node to remove.

$validation_error

(array) (Optional) Validation error details.

Default value:array()


Return #

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


Changelog #

Changelog
Version Description
0.7 Introduced.