1
0
mirror of https://github.com/thangisme/notes.git synced 2024-11-06 20:47:27 -05:00

escape the single quotes in the string

This commit is contained in:
John Boyle 2019-01-31 10:02:06 -08:00
parent eaafeee675
commit da0762007d

View File

@ -14,8 +14,8 @@ namespace :search do
{ {
{% for page in site.html_pages %}{% if page.search_exclude != true %}"{{ forloop.index0 }}": { {% for page in site.html_pages %}{% if page.search_exclude != true %}"{{ forloop.index0 }}": {
"id": "{{ forloop.index0 }}", "id": "{{ forloop.index0 }}",
"title": "{{ page.title | replace: '&', '&' }}", "title": "{{ page.title | replace: \'&\', \'&\' }}",
"content": "'+content+'", "content": "\'+content+\'",
"url": "{{ page.url | absolute_url }}", "url": "{{ page.url | absolute_url }}",
"relUrl": "{{ page.url }}" "relUrl": "{{ page.url }}"
}{% unless forloop.last %},{% endunless %} }{% unless forloop.last %},{% endunless %}