[Answered ]-How to striptags in haystack highlight?

2👍

Like this:

{% for text in result.highlighted.text %}
    <blockquote>
        {% with text|striptags as stripped_text %}
            {% highlight stripped_text with query %}
        {% endwith %}
    </blockquote>
{% endfor %}

https://docs.djangoproject.com/en/def/ref/templates/builtins/#with

👤Greg

Leave a comment