Skip to content
Snippets Groups Projects

Issue #2905420 by mikey_p, DrupalHack, albert volkman: Fix empty render context

Open Eric Smith requested to merge issue/toc_api-2905420:2905420-fix-empty-render into 8.x-1.x
+ 3
3
@@ -86,7 +86,7 @@ class TocBuilder implements TocBuilderInterface {
];
$fragment_node = $dom->createDocumentFragment();
$html = Html::normalize($this->renderer->render($build));
$html = Html::normalize($this->renderer->renderPlain($build));
// Trim to ensure the first child is a DOMElement.
$html = trim($html);
// Build a new DOMDocument for the HTML.
@@ -124,7 +124,7 @@ class TocBuilder implements TocBuilderInterface {
];
$fragment_node = $dom->createDocumentFragment();
$html = Html::normalize($this->renderer->render($build));
$html = Html::normalize($this->renderer->renderPlain($build));
// Trim to ensure the first child is a DOMElement.
$html = trim($html);
// Build a new DOMDocument for the HTML.
@@ -154,7 +154,7 @@ class TocBuilder implements TocBuilderInterface {
}
$build = $this->buildToc($toc);
return $this->renderer->render($build);
return $this->renderer->renderPlain($build);
}
/**
Loading