[Fix] oscar: no HTML escaping prior to output
When results are fetched from any programming related documentation site
(like git-scm.com, docs.python.org etc), content in Info box is shown as
raw HTML code.
This change addresses the issue by using "safe" filter feature provided by
Django. See,
- https://docs.djangoproject.com/en/3.0/ref/templates/builtins/#safe
- Searx issue tracker (issue #1649), for more information.
Resolves: #1649
commit6a5aae65308b3808e4ebc0602c7f90b1a5cb888b
authorVipul <finn02@disroot.org>
dateSun 22 Dec 2019, 01:21 (7 years ago)
parent36ca2dc
searx/templates/oscar/infobox.html+1−1
@@ -6,7 +6,7 @@
66 <div class="panel-body">
77 {% if infobox.img_src %}<img class="img-responsive center-block infobox_part" src="{{ image_proxify(infobox.img_src) }}" alt="{{ infobox.infobox }}" />{% endif %}
88
9− {% if infobox.content %}<bdi><p class="infobox_part">{{ infobox.content }}</p></bdi>{% endif %}
9+ {% if infobox.content %}<bdi><p class="infobox_part">{{ infobox.content | safe }}</p></bdi>{% endif %}
1010
1111 {% if infobox.attributes -%}
1212 <table class="table table-striped infobox_part">