diff --git a/assets/js/data/search.json b/assets/js/data/search.json index 0aaf170..5192c9f 100644 --- a/assets/js/data/search.json +++ b/assets/js/data/search.json @@ -6,13 +6,13 @@ swcache: true [ {% for post in site.posts %} { - "title": "{{ post.title | escape }}", - "url": "{{ post.url | relative_url }}", - "categories": "{{ post.categories | join: ', '}}", - "tags": "{{ post.tags | join: ', ' }}", + "title": {{ post.title | jsonify }}, + "url": {{ post.url | relative_url | jsonify }}, + "categories": {{ post.categories | join: ', ' | jsonify }}, + "tags": {{ post.tags | join: ', ' | jsonify }}, "date": "{{ post.date }}", {% include no-linenos.html content=post.content %} - "snippet": "{{ content | strip_html | strip_newlines | remove_chars | escape | replace: '\', '\\\\' }}" + "snippet": {{ content | strip_html | strip_newlines | jsonify }} }{% unless forloop.last %},{% endunless %} {% endfor %} ]