Skip to content

Commit

Permalink
Sanitize excerpts in search.json
Browse files Browse the repository at this point in the history
- Fixes #191
  • Loading branch information
mmistakes committed Feb 17, 2016
1 parent 808c104 commit 4cfd7a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions search.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sitemap: false
{% if forloop.index > 1 %},{% endif %}{
"title" : {{ post.title | jsonify }},
"link" : "{{ site.url }}{{ post.url }}",
"excerpt" : "{{ post.excerpt }}"
"excerpt" : "{{ post.excerpt | markdownify | strip_html | strip_newlines | escape_once | remove: '\[' | remove: '\]' | remove: '\(' | remove: '\)' }}"
}
{% endif %}
{% endfor %}
Expand All @@ -18,7 +18,7 @@ sitemap: false
{% if forloop.index > 1 %},{% endif %}{
"title" : {{ page.title | jsonify }},
"link" : "{{ site.url }}{{ page.url | replace: 'index.html', '' }}",
"excerpt" : "{{ page.excerpt }}"
"excerpt" : "{{ page.excerpt | markdownify | strip_html | strip_newlines | escape_once }}"
}
{%endif%}
{% endfor %}
Expand Down

0 comments on commit 4cfd7a7

Please sign in to comment.