diff --git a/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php b/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php index de4d6bc..c9ae172 100644 --- a/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php +++ b/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php @@ -196,7 +196,7 @@ protected function prepare(array $main_content, Request $request, RouteMatchInte // otherwise get it from the routing information. $get_title = function (array $main_content) use ($request, $route_match) { $this_title = isset($main_content['#title']) ? $main_content['#title'] : $this->titleResolver->getTitle($request, $route_match->getRouteObject()); - return isset($this_title['#markup']) ? $this->renderer->render($this_title, FALSE) : $this_title; + return isset($this_title['#markup']) ? $this->renderer->renderPlain($this_title) : $this_title; }; // If the _controller result already is #type => page, diff --git a/core/modules/block/src/Plugin/DisplayVariant/BlockPageVariant.php b/core/modules/block/src/Plugin/DisplayVariant/BlockPageVariant.php index e0b41c6..5785f8d 100644 --- a/core/modules/block/src/Plugin/DisplayVariant/BlockPageVariant.php +++ b/core/modules/block/src/Plugin/DisplayVariant/BlockPageVariant.php @@ -190,7 +190,7 @@ public function build() { // Analogously for the page title. if (!$title_block_displayed) { $build['title'] = [ - '#markup' => ['#markup' => $this->title], + '#markup' => $this->title, ]; }