From 8121ad02690c256b997a4b068714d909d1db796d Mon Sep 17 00:00:00 2001 From: George <31376482+george-gca@users.noreply.github.com> Date: Fri, 6 Dec 2024 12:20:36 -0300 Subject: [PATCH] Fix apostrophe in news title for search (#2879) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix #2876 Weirdly enough, we already escape the title a few lines above the changed one, but had to escape it again here. Signed-off-by: George Araújo --- _includes/scripts/search.liquid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -%}