FIX: Use topic title headline in search menu result.

FIX: Use topic title headline in search menu result.

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 d1981ad..159cba0 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,9 @@ createSearchResult({
       h(
         "span.topic-title",
         { attributes: { "data-topic-id": topic.id } },
-        new Highlighted(topic.fancyTitle, term)
+        this.siteSettings.use_pg_headlines_for_excerpt
+          ? new RawHtml({ html: `<span>${result.topic_title_headline}</span>` })
+          : new Highlighted(topic.fancyTitle, term)
       ),
     ];
 

GitHub sha: 4b8c15b8

This commit appears in #10796 which was approved by ZogStriP. It was merged by tgxworld.