diff --git a/assets/js/search-data.json b/assets/js/search-data.json index 5dffa7b..49cbc9d 100644 --- a/assets/js/search-data.json +++ b/assets/js/search-data.json @@ -3,10 +3,10 @@ { {% for page in site.html_pages %}{% if page.search_exclude != true %}"{{ forloop.index0 }}": { "id": "{{ forloop.index0 }}", - "title": "{{ page.title | xml_escape }}", + "title": "{{ page.title | replace: '&', '&' }}", "content": "{{ page.content | markdownify | strip_html | escape_once | remove: 'Table of contents' | remove: '```' | remove: '---' | replace: '\', ' ' | normalize_whitespace }}", - "url": "{{ page.url | absolute_url | xml_escape }}", - "relUrl": "{{ page.url | xml_escape }}" + "url": "{{ page.url | absolute_url }}", + "relUrl": "{{ page.url }}" }{% unless forloop.last %},{% endunless %} {% endif %}{% endfor %} } diff --git a/docs/search.md b/docs/search.md index 7584c8b..134e399 100644 --- a/docs/search.md +++ b/docs/search.md @@ -39,10 +39,10 @@ This command creates the `search-data.json` file that Jekyll uses to create your { {% for page in site.html_pages %}{% if page.search_exclude != true %}"{{ forloop.index0 }}": { "id": "{{ forloop.index0 }}", - "title": "{{ page.title | xml_escape }}", + "title": "{{ page.title | replace: '&', '&' }}", "content": "{{ page.content | markdownify | strip_html | escape_once | remove: 'Table of contents' | remove: '```' | remove: '---' | replace: '\', ' ' | normalize_whitespace }}", - "url": "{{ page.url | absolute_url | xml_escape }}", - "relUrl": "{{ page.url | xml_escape }}" + "url": "{{ page.url | absolute_url }}", + "relUrl": "{{ page.url }}" }{% unless forloop.last %},{% endunless %} {% endif %}{% endfor %} }{% endraw %} diff --git a/lib/tasks/search.rake b/lib/tasks/search.rake index d91462d..50ef275 100644 --- a/lib/tasks/search.rake +++ b/lib/tasks/search.rake @@ -14,10 +14,10 @@ namespace :search do { {% for page in site.html_pages %}{% if page.search_exclude != true %}"{{ forloop.index0 }}": { "id": "{{ forloop.index0 }}", - "title": "{{ page.title | xml_escape }}", + "title": "{{ page.title | replace: '&', '&' }}", "content": "'+content+'", - "url": "{{ page.url | absolute_url | xml_escape }}", - "relUrl": "{{ page.url | xml_escape }}" + "url": "{{ page.url | absolute_url }}", + "relUrl": "{{ page.url }}" }{% unless forloop.last %},{% endunless %} {% endif %}{% endfor %} }'