diff --git a/_includes/scripts/search.liquid b/_includes/scripts/search.liquid
index a1be0482419c..0ecf51d5139b 100644
--- a/_includes/scripts/search.liquid
+++ b/_includes/scripts/search.liquid
@@ -106,7 +106,7 @@
{%- 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 }}',
+ title: '{{ title | escape | emojify | truncatewords: 13 }}',
description: "{{ item.description | strip_html | strip_newlines | escape | strip }}",
section: "{{ collection.label | capitalize }}",
{%- unless item.inline -%}