From 8bea927bb02e02754834d6f9692942f621bd21c5 Mon Sep 17 00:00:00 2001 From: Vipul Date: Sun, 22 Dec 2019 01:21:22 +0000 Subject: [PATCH] [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 --- searx/templates/oscar/infobox.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/templates/oscar/infobox.html b/searx/templates/oscar/infobox.html index 9f5e58d2..9802f11e 100644 --- a/searx/templates/oscar/infobox.html +++ b/searx/templates/oscar/infobox.html @@ -6,7 +6,7 @@
{% if infobox.img_src %}{{ infobox.infobox }}{% endif %} - {% if infobox.content %}

{{ infobox.content }}

{% endif %} + {% if infobox.content %}

{{ infobox.content | safe }}

{% endif %} {% if infobox.attributes -%}