diff --git a/app/assets/javascripts/admin/templates/search-logs-term.hbs b/app/assets/javascripts/admin/templates/search-logs-term.hbs index 54348aea2e1..50b58ecfc05 100644 --- a/app/assets/javascripts/admin/templates/search-logs-term.hbs +++ b/app/assets/javascripts/admin/templates/search-logs-term.hbs @@ -54,9 +54,13 @@ {{#if result.blurb}} - {{#highlight-search highlight=term}} + {{#if siteSettings.use_pg_headlines_for_excerpt}} {{html-safe result.blurb}} - {{/highlight-search}} + {{else}} + {{#highlight-search highlight=highlightQuery}} + {{html-safe result.blurb}} + {{/highlight-search}} + {{/if}} {{/if}} 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 7d7b70c632f..dedf5bed201 100644 --- a/app/assets/javascripts/discourse/app/templates/full-page-search.hbs +++ b/app/assets/javascripts/discourse/app/templates/full-page-search.hbs @@ -112,9 +112,13 @@ {{#if result.blurb}} - {{#highlight-search highlight=highlightQuery}} + {{#if siteSettings.use_pg_headlines_for_excerpt}} {{html-safe result.blurb}} - {{/highlight-search}} + {{else}} + {{#highlight-search highlight=highlightQuery}} + {{html-safe result.blurb}} + {{/highlight-search}} + {{/if}} {{/if}}