From 7b3e0f741a7ba285f4556b20ec76c2959cf30bbf Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Fri, 24 Apr 2020 15:16:52 +0800 Subject: [PATCH] Fixed json parse issue on search. --- assets/data/search.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/data/search.json b/assets/data/search.json index 6ae087f..5627dca 100644 --- a/assets/data/search.json +++ b/assets/data/search.json @@ -10,7 +10,7 @@ layout: compress "categories": "{{ post.categories | join: ', '}}", "tags": "{{ post.tags | join: ', ' }}", "date": "{{ post.date }}", - "snippet": "{{ post.content | strip_html | strip_newlines | remove_chars | escape | truncate: 300 }}" + "snippet": "{{ post.content | strip_html | strip_newlines | remove_chars | escape | truncate: 300 | replace: '\', '\\\\' }}" }{% unless forloop.last %},{% endunless %} {% endfor %} ]