Fixed json parse issue on search.

This commit is contained in:
Cotes Chung 2020-04-24 15:16:52 +08:00
parent 7cea137bf4
commit 7b3e0f741a

View file

@ -10,7 +10,7 @@ layout: compress
"categories": "{{ post.categories | join: ', '}}", "categories": "{{ post.categories | join: ', '}}",
"tags": "{{ post.tags | join: ', ' }}", "tags": "{{ post.tags | join: ', ' }}",
"date": "{{ post.date }}", "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 %} }{% unless forloop.last %},{% endunless %}
{% endfor %} {% endfor %}
] ]