Automattic\WooCommerce\Vendor\Pelago\Emogrifier\HtmlProcessor
AbstractHtmlProcessor::removeHtmlComments
Removes comments from the given HTML, including any which are unterminated, 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->removeHtmlComments( $html ): string;
- $html(string) (required)
- .
AbstractHtmlProcessor::removeHtmlComments() AbstractHtmlProcessor::removeHtmlComments code WC 10.4.3
private function removeHtmlComments(string $html): string
{
return (new Preg())->throwExceptions(true)->replace(self::HTML_COMMENT_PATTERN, '', $html);
}