FIX: Expose PG headline highlighting for all search results.

FIX: Expose PG headline highlighting for all search results.

diff --git a/app/assets/javascripts/admin/templates/search-logs-term.hbs b/app/assets/javascripts/admin/templates/search-logs-term.hbs
index 50b58ec..b4b0c8a 100644
--- a/app/assets/javascripts/admin/templates/search-logs-term.hbs
+++ b/app/assets/javascripts/admin/templates/search-logs-term.hbs
@@ -31,7 +31,16 @@
         <div class="fps-topic">
           <div class="topic">
             <a href={{result.url}} class="search-link">
-              {{topic-status topic=result.topic disableActions=true}}<span class="topic-title">{{#highlight-search highlight=term}}{{html-safe result.topic.fancyTitle}}{{/highlight-search}}</span>
+              {{topic-status topic=result.topic disableActions=true}}
+              <span class="topic-title">
+                {{#if result.useTopicTitleHeadline}}
+                  {{html-safe result.topicTitleHeadline}}
+                {{else}}
+                  {{#highlight-search highlight=q}}
+                    {{html-safe result.topic.fancyTitle}}
+                  {{/highlight-search}}
+                {{/if}}
+              </span>
             </a>
 
             <div class="search-category">
diff --git a/app/assets/javascripts/discourse/app/models/post.js b/app/assets/javascripts/discourse/app/models/post.js
index f45a966..27e0776 100644
--- a/app/assets/javascripts/discourse/app/models/post.js
+++ b/app/assets/javascripts/discourse/app/models/post.js
@@ -112,7 +112,7 @@ const Post = RestModel.extend({
   },
 
   @discourseComputed("topic_title_headline")
-  topicTitleHead(title) {
+  topicTitleHeadline(title) {
     return fancyTitle(title, this.siteSettings.support_mixed_text_direction);
   },
 
diff --git a/app/assets/javascripts/discourse/app/templates/full-page-search.hbs b/app/assets/javascripts/discourse/app/templates/full-page-search.hbs
index 3f1657c..3f860f5 100644
--- a/app/assets/javascripts/discourse/app/templates/full-page-search.hbs
+++ b/app/assets/javascripts/discourse/app/templates/full-page-search.hbs
@@ -90,7 +90,7 @@
                     {{topic-status topic=result.topic disableActions=true showPrivateMessageIcon=true}}
                     <span class="topic-title">
                       {{#if result.useTopicTitleHeadline}}
-                        {{html-safe result.topicTitleHead}}
+                        {{html-safe result.topicTitleHeadline}}
                       {{else}}
                         {{#highlight-search highlight=q}}
                           {{html-safe result.topic.fancyTitle}}
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 6e0dc23..5034092 100644
--- a/app/assets/javascripts/discourse/app/widgets/search-menu-results.js
+++ b/app/assets/javascripts/discourse/app/widgets/search-menu-results.js
@@ -59,7 +59,9 @@ function postResult(result, link, term) {
       h("span.blurb", [
         dateNode(result.created_at),
         h("span", " - "),
-        new Highlighted(result.blurb, term)
+        this.siteSettings.use_pg_headlines_for_excerpt
+          ? new RawHtml({ html: `<span>${result.blurb}</span>` })
+          : new Highlighted(result.blurb, term)
       ])
     );
   }

GitHub sha: 808e84a8