diff --git a/app/assets/javascripts/discourse/app/widgets/search-menu-results.js b/app/assets/javascripts/discourse/app/widgets/search-menu-results.js index 8c0719f0028..1d974350b12 100644 --- a/app/assets/javascripts/discourse/app/widgets/search-menu-results.js +++ b/app/assets/javascripts/discourse/app/widgets/search-menu-results.js @@ -151,7 +151,10 @@ createSearchResult({ h( "span.topic-title", { attributes: { "data-topic-id": topic.id } }, - new Highlighted(topic.fancyTitle, term) + this.siteSettings.use_pg_headlines_for_excerpt && + result.topic_title_headline + ? new RawHtml({ html: `${result.topic_title_headline}` }) + : new Highlighted(topic.fancyTitle, term) ), ];