AMP_Base_Sanitizer
Description #
Class AMP_Base_Sanitizer
Source #
Methods #
- __construct — AMP_Base_Sanitizer constructor.
- add_buffering_hooks — Add filters to manipulate output during output buffering before the DOM is constructed.
- add_or_append_attribute — Adds or appends key and value to list of attributes
- clean_up_after_attribute_removal — Cleans up artifacts after the removal of an attribute node.
- filter_attachment_layout_attributes — Set attributes to node's parent element according to layout.
- filter_data_amp_attributes — Set AMP attributes.
- get_arg — Get arg.
- get_args — Get args.
- get_body_node — Get HTML body as DOMElement from Dom\Document received by the constructor. — deprecated
- get_data_amp_attributes — Get data-amp-* values from the parent node 'figure' added by editor block.
- get_scripts — Return array of values that would be valid as an HTML script element.
- get_selector_conversion_mapping — Get mapping of HTML selectors to the AMP component selectors which they may be converted into.
- get_stylesheets — Get stylesheets.
- get_validate_response_data — Get data that is returned in validate responses.
- has_dev_mode_exemption — Check whether a node is exempt from validation during dev mode. — deprecated
- has_light_shadow_dom — Determine whether the resulting AMP element uses a "light" shadow DOM.
- init — Run logic before any sanitizers are run.
- is_document_in_dev_mode — Check whether the document of a given node is in dev mode. — deprecated
- is_empty_attribute_value — Determine if an attribute value is empty.
- is_exempt_from_validation — Check whether a certain node should be exempt from validation. — deprecated
- maybe_enforce_https_src — Decide if we should remove a src attribute if https is required.
- parse_style_string — Parse a style string into an associative array of style attributes.
- prepare_validation_error — Prepare validation error.
- reassemble_style_string — Reassemble a style string that can be used in a 'style' attribute.
- remove_invalid_attribute — Removes an invalid attribute of a node.
- remove_invalid_child — Removes an invalid child of a node.
- sanitize — Sanitize the HTML contained in the DOMDocument received by the constructor
- sanitize_dimension — Sanitizes a CSS dimension specifier while being sensitive to dimension context.
- set_layout — Sets the layout, and possibly the 'height' and 'width' attributes.
- should_sanitize_validation_error — Check whether or not sanitization should occur in response to validation error.
- update_args — Update args.