From 36ca2dcc56651688cd7ca8b8d925a9370bdc1dec Mon Sep 17 00:00:00 2001 From: Vipul Date: Fri, 20 Dec 2019 23:34:22 +0000 Subject: [PATCH 1/2] [Fix] oscar: move info box at top of the page In low width devices like mobile, tablet etc, info box is present at bottom of the page. This change addresses the issue by rearranging column grids for low width devices and move side bar at top of the page. See - https://getbootstrap.com/docs/3.3/css/#grid-column-ordering. - and Searx issue tracker (issue#1777), for more information. Effect: Along with Info, Suggestion and Link boxes also move to top of the page. Resolves: #1777 --- searx/templates/oscar/results.html | 124 ++++++++++++++--------------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/searx/templates/oscar/results.html b/searx/templates/oscar/results.html index 9cf94269..43e3e26d 100644 --- a/searx/templates/oscar/results.html +++ b/searx/templates/oscar/results.html @@ -15,7 +15,68 @@ {% include 'oscar/search.html' %}
-
+ + +

{{ _('Search results') }}

{% if corrections -%} @@ -91,66 +152,5 @@ {% endif %} {% endif %}
- -
{% endblock %} From 6a5aae65308b3808e4ebc0602c7f90b1a5cb888b Mon Sep 17 00:00:00 2001 From: Vipul Date: Sun, 22 Dec 2019 01:21:22 +0000 Subject: [PATCH 2/2] [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 -%}