- {{topic-status topic=result.topic disableActions=true}}{{#highlight-search highlight=term}}{{html-safe result.topic.fancyTitle}}{{/highlight-search}}
+ {{topic-status topic=result.topic disableActions=true}}
+
+ {{#if result.useTopicTitleHeadline}}
+ {{html-safe result.topicTitleHeadline}}
+ {{else}}
+ {{#highlight-search highlight=q}}
+ {{html-safe result.topic.fancyTitle}}
+ {{/highlight-search}}
+ {{/if}}
+
diff --git a/app/assets/javascripts/discourse/app/models/post.js b/app/assets/javascripts/discourse/app/models/post.js
index f45a9668c1e..27e0776cc69 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 3f1657c013a..3f860f55256 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}}
{{#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 6e0dc237170..5034092826f 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: `${result.blurb}` })
+ : new Highlighted(result.blurb, term)
])
);
}