Automattic\WooCommerce\Vendor\Pelago\Emogrifier\HtmlProcessor
AbstractHtmlProcessor::prepareHtmlForDomConversion
Returns the HTML with added document type, Content-Type meta tag, and self-closing slashes, if needed, ensuring that the HTML will be good for creating a DOM document from it.
Метод класса: AbstractHtmlProcessor{}
Хуков нет.
Возвращает
string. the unified HTML
Использование
// private - только в коде основоного (родительского) класса $result = $this->prepareHtmlForDomConversion( $html ): string;
- $html(строка) (обязательный)
- .
Код AbstractHtmlProcessor::prepareHtmlForDomConversion() AbstractHtmlProcessor::prepareHtmlForDomConversion WC 11.2.1
private function prepareHtmlForDomConversion(string $html): string
{
$htmlWithSelfClosingSlashes = $this->ensurePhpUnrecognizedSelfClosingTagsAreXml($html);
$htmlWithDocumentType = $this->ensureDocumentType($htmlWithSelfClosingSlashes);
return $this->addContentTypeMetaTag($htmlWithDocumentType);
}