Automattic\WooCommerce\Vendor\Pelago\Emogrifier\HtmlProcessor

AbstractHtmlProcessor::renderBodyContent │ public │ WC 1.0

Renders the content of the BODY element of the normalized and processed HTML.

Method of the class: AbstractHtmlProcessor{}

No Hooks.

Returns

string.

Usage

$AbstractHtmlProcessor = new AbstractHtmlProcessor();
$AbstractHtmlProcessor->renderBodyContent(): string;

AbstractHtmlProcessor::renderBodyContent() code WC 11.1.2

public function renderBodyContent(): string
{
    $htmlWithPossibleErroneousClosingTags = $this->getDomDocument()->saveHTML($this->getBodyElement());
    $bodyNodeHtml = $this->removeSelfClosingTagsClosingTags($htmlWithPossibleErroneousClosingTags);

    return (new Preg())->replace('%</?+body(?:\\s[^>]*+)?+>%', '', $bodyNodeHtml);
}