We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The current sanitizer doesn't handle backslashes correctly.
I've the following page source code:
{% highlight shell %} do stuff "domain\username" {% endhighlight %}
Using the current sanitizer in search-lunr.html it breaks lunr. The fix is to add replace: '\','\\\\' to the document variable in search-lunr.html:
replace: '\','\\\\'
search-lunr.html
var documents = [{% for page in site.pages %}{% if page.url contains '.xml' or page.url contains 'assets' %}{% else %}{ "id": {{ counter }}, "url": "{{ site.url }}{{site.baseurl}}{{ page.url }}", "title": "{{ page.title }}", "body": "{{ page.content | markdownify | replace: '\','\\\\' | replace: '.', '. ' | replace: '</h2>', ': ' | replace: '</h3>', ': ' | replace: '</h4>', ': ' | replace: '</p>', ' ' | strip_html | strip_newlines | replace: ' ', ' ' | replace: '"', ' ' }}"{% assign counter = counter | plus: 1 %} }, {% endif %}{% endfor %}{% for page in site.without-plugin %}{ "id": {{ counter }}, "url": "{{ site.url }}{{site.baseurl}}{{ page.url }}", "title": "{{ page.title }}", "body": "{{ page.content | markdownify | replace: '\','\\\\' | replace: '.', '. ' | replace: '</h2>', ': ' | replace: '</h3>', ': ' | replace: '</h4>', ': ' | replace: '</p>', ' ' | strip_html | strip_newlines | replace: ' ', ' ' | replace: '"', ' ' }}"{% assign counter = counter | plus: 1 %} }, {% endfor %}{% for page in site.posts %}{ "id": {{ counter }}, "url": "{{ site.url }}{{site.baseurl}}{{ page.url }}", "title": "{{ page.title }}", "body": "{{ page.date | date: "%Y/%m/%d" }} - {{ page.content | markdownify | replace: '\','\\\\' | replace: '.', '. ' | replace: '</h2>', ': ' | replace: '</h3>', ': ' | replace: '</h4>', ': ' | replace: '</p>', ' ' | strip_html | strip_newlines | replace: ' ', ' ' | replace: '"', ' ' }}"{% assign counter = counter | plus: 1 %} }{% if forloop.last %}{% else %}, {% endif %}{% endfor %}];
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The current sanitizer doesn't handle backslashes correctly.
I've the following page source code:
Using the current sanitizer in search-lunr.html it breaks lunr.
The fix is to add
replace: '\','\\\\'
to the document variable insearch-lunr.html
:The text was updated successfully, but these errors were encountered: