diff --git a/_includes/scripts/search.liquid b/_includes/scripts/search.liquid
index 3acf15c..95e219c 100644
--- a/_includes/scripts/search.liquid
+++ b/_includes/scripts/search.liquid
@@ -79,7 +79,6 @@
{% if post.redirect == blank %}
title: "{{ title | truncatewords: 13 }}",
{% elsif post.redirect contains '://' %}
- // TODO: fix the svg icon position for external posts
title: '{{ title | truncatewords: 13 }} ',
{% else %}
title: "{{ title | truncatewords: 13 }}",
@@ -102,9 +101,9 @@
{%- for item in collection.docs -%}
{
{%- if item.inline -%}
- {%- assign title = item.content | strip_html | strip_newlines | escape | strip -%}
+ {%- assign title = item.content | newline_to_br | replace: "
", " " | replace: "
", " " | strip_html | strip_newlines | escape | strip -%}
{%- else -%}
- {%- assign title = item.title | strip_html | strip_newlines | escape | strip -%}
+ {%- assign title = item.title | newline_to_br | replace: "
", " " | replace: "
", " " | strip_html | strip_newlines | escape | strip -%}
{%- endif -%}
id: "{{ collection.label }}-{{ title | slugify }}",
title: '{{ title | emojify | truncatewords: 13 }}',