diff --git a/core/modules/node/src/Plugin/Search/NodeSearch.php b/core/modules/node/src/Plugin/Search/NodeSearch.php index 87a3851..53932d9 100644 --- a/core/modules/node/src/Plugin/Search/NodeSearch.php +++ b/core/modules/node/src/Plugin/Search/NodeSearch.php @@ -333,10 +333,9 @@ protected function prepareResults(StatementInterface $found) { $build['#pre_render'][] = array($this, 'removeSubmittedInfo'); // Fetch comment count for snippet. - $rendered = SafeMarkup::set( - $this->renderer->renderPlain($build) . ' ' . - SafeMarkup::escape($this->moduleHandler->invoke('comment', 'node_update_index', array($node, $item->langcode))) - ); + $built = $this->renderer->renderPlain($build); + $comments = $this->moduleHandler->invoke('comment', 'node_update_index', array($node, $item->langcode)); + $rendered = SafeMarkup::format('@built @comments', ['@built' => $built, '@comments' => $comments]); $extra = $this->moduleHandler->invokeAll('node_search_result', array($node, $item->langcode));