Automattic\WooCommerce\Vendor\Pelago\Emogrifier\HtmlProcessor
AbstractHtmlProcessor::removeHtmlTemplateElements
Removes <template> elements from the given HTML, including any without an end tag, for which the remainder of the string is removed.
Method of the class: AbstractHtmlProcessor{}
No Hooks.
Returns
String.
Usage
// private - for code of main (parent) class only $result = $this->removeHtmlTemplateElements( $html ): string;
- $html(string) (required)
- .
AbstractHtmlProcessor::removeHtmlTemplateElements() AbstractHtmlProcessor::removeHtmlTemplateElements code WC 10.5.0
private function removeHtmlTemplateElements(string $html): string
{
return (new Preg())->throwExceptions(true)->replace(self::HTML_TEMPLATE_ELEMENT_PATTERN, '', $html);
}