-
-
{{ result.pretty_url }} {{ _('cached') }}
+
+
{{ result.pretty_url }} {{ _('cached') }}
{% if result.publishedDate %}
{{ result.publishedDate }}
{% endif %}
{% if result.img_src %}{% endif %}{% if result.content %}{{ result.content|safe }}
{% endif %}
- {% if result.repository %}
{{ result.repository }}
{% endif %}
+ {% if result.repository %}
{{ result.repository }}
{% endif %}
{{ result.codelines|code_highlighter(result.code_language)|safe }}
diff --git a/searx/templates/default/result_templates/default.html b/searx/templates/default/result_templates/default.html
index 89091e280..da091174d 100644
--- a/searx/templates/default/result_templates/default.html
+++ b/searx/templates/default/result_templates/default.html
@@ -1,6 +1,6 @@
-
{% if "icon_"~result.engine~".ico" in favicons %}{% endif %}{{ result.title|safe }}
-
{{ result.pretty_url }} {{ _('cached') }}
+
{% if "icon_"~result.engine~".ico" in favicons %}{% endif %}{{ result.title|safe }}
+
{{ result.pretty_url }} {{ _('cached') }}
{% if result.publishedDate %}{{ result.publishedDate }}{% endif %}
{% if result.img_src %}{% endif %}{% if result.content %}{{ result.content|safe }}
{% endif %}
diff --git a/searx/templates/default/result_templates/images.html b/searx/templates/default/result_templates/images.html
index d85f841ae..00f62abcc 100644
--- a/searx/templates/default/result_templates/images.html
+++ b/searx/templates/default/result_templates/images.html
@@ -1,6 +1,6 @@
diff --git a/searx/templates/default/result_templates/map.html b/searx/templates/default/result_templates/map.html
index d413742e7..0200e0f6b 100644
--- a/searx/templates/default/result_templates/map.html
+++ b/searx/templates/default/result_templates/map.html
@@ -5,8 +5,8 @@
{% endif %}
-
-
{{ result.pretty_url }} {{ _('cached') }}
+
+
{{ result.pretty_url }} {{ _('cached') }}
{% if result.publishedDate %}{{ result.publishedDate }}{% endif %}
{% if result.img_src %}{% endif %}{% if result.content %}{{ result.content|safe }}
{% endif %}
diff --git a/searx/templates/default/result_templates/torrent.html b/searx/templates/default/result_templates/torrent.html
index 4b2522ad0..67e058ae5 100644
--- a/searx/templates/default/result_templates/torrent.html
+++ b/searx/templates/default/result_templates/torrent.html
@@ -2,12 +2,12 @@
{% if "icon_"~result.engine~".ico" in favicons %}
{% endif %}
-
+
{{ result.pretty_url }}
{% if result.content %}
{{ result.content|safe }}
{% endif %}
{% if result.magnetlink %}{{ _('magnet link') }}{% endif %}
- {% if result.torrentfile %}{{ _('torrent file') }}{% endif %} -
+ {% if result.torrentfile %}{{ _('torrent file') }}{% endif %} -
{{ _('Seeder') }} : {{ result.seed }}, {{ _('Leecher') }} : {{ result.leech }}
diff --git a/searx/templates/default/result_templates/videos.html b/searx/templates/default/result_templates/videos.html
index 5a377b70f..727f44c71 100644
--- a/searx/templates/default/result_templates/videos.html
+++ b/searx/templates/default/result_templates/videos.html
@@ -1,6 +1,6 @@
-
{% if "icon_"~result.engine~".ico" in favicons %}{% endif %}{{ result.title|safe }}
+
{% if "icon_"~result.engine~".ico" in favicons %}{% endif %}{{ result.title|safe }}
{% if result.publishedDate %}
{{ result.publishedDate }}{% endif %}
-
+
{{ result.url }}
diff --git a/searx/templates/oscar/404.html b/searx/templates/oscar/404.html
index 39836ce0e..11d789564 100644
--- a/searx/templates/oscar/404.html
+++ b/searx/templates/oscar/404.html
@@ -2,6 +2,8 @@
{% block content %}
{{ _('Page not found') }}
-
{{ _('Go to search page.') }}
+ {% autoescape false %}
+
{{ _('Go to %(search_page)s.', search_page='{}'.decode('utf-8').format(url_for('index'), _('search page'))) }}
+ {% endautoescape %}
{% endblock %}
diff --git a/searx/templates/oscar/infobox.html b/searx/templates/oscar/infobox.html
index 70d12f2fb..c98fb0e63 100644
--- a/searx/templates/oscar/infobox.html
+++ b/searx/templates/oscar/infobox.html
@@ -1,3 +1,4 @@
+{% from 'oscar/macros.html' import result_link with context %}
{{ infobox.infobox }}
@@ -25,7 +26,7 @@
{% for url in infobox.urls %}
- {{ url.title }}
+ {{ result_link(url.url, url.title) }}
{% endfor %}
diff --git a/searx/templates/oscar/macros.html b/searx/templates/oscar/macros.html
index bf51d5940..06881db02 100644
--- a/searx/templates/oscar/macros.html
+++ b/searx/templates/oscar/macros.html
@@ -9,16 +9,20 @@
{%- endmacro %}
+{%- macro result_link(url, title, classes='') -%}
+
{{ title }}
+{%- endmacro -%}
+
-{% macro result_header(result, favicons) -%}
-
+{% macro result_header(result, favicons) -%}
+
{%- endmacro %}
{% macro result_sub_header(result) -%}
{% if result.publishedDate %}
{% endif %}
- {% if result.magnetlink %}
• {{ icon('magnet') }} {{ _('magnet link') }}{% endif %}
- {% if result.torrentfile %}
• {{ icon('download-alt') }} {{ _('torrent file') }}{% endif %}
+ {% if result.magnetlink %}
• {{ result_link(result.magnetlink, icon('magnet') + _('magnet link'), "magnetlink") }}{% endif %}
+ {% if result.torrentfile %}
• {{ result_link(result.torrentfile, icon('download-alt') + _('torrent file'), "torrentfile") }}{% endif %}
{%- endmacro %}
@@ -28,7 +32,7 @@
{% for engine in result.engines %}
{{ engine }}
{% endfor %}
-
{{ icon('link') }} {{ _('cached') }}
+
{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }}
{{ result.pretty_url }}
{%- endmacro %}
@@ -39,7 +43,7 @@
{% for engine in result.engines %}
{{ engine }}
{% endfor %}
-
{{ icon('link') }} {{ _('cached') }}
+
{{ result_link("https://web.archive.org/web/" + result.url, icon('link') + _('cached'), "text-info") }}
{{ result.pretty_url }}
{%- endmacro %}
diff --git a/searx/templates/oscar/preferences.html b/searx/templates/oscar/preferences.html
index 0e3848b7c..283b7ba88 100644
--- a/searx/templates/oscar/preferences.html
+++ b/searx/templates/oscar/preferences.html
@@ -117,6 +117,15 @@
{{ preferences_item_footer(_('Choose style for this theme'), _('Style'), rtl) }}
+
+ {% set label = _('Results on new tabs') %}
+ {% set info = _('Open result links on new browser tabs') %}
+ {{ preferences_item_header(info, label, rtl) }}
+
+ {{ preferences_item_footer(info, label, rtl) }}
diff --git a/searx/templates/oscar/result_templates/code.html b/searx/templates/oscar/result_templates/code.html
index 582a2149c..ba74d0333 100644
--- a/searx/templates/oscar/result_templates/code.html
+++ b/searx/templates/oscar/result_templates/code.html
@@ -5,7 +5,7 @@
{% if result.content %}
{{ result.codelines|code_highlighter(result.code_language)|safe }}
diff --git a/searx/templates/oscar/result_templates/default.html b/searx/templates/oscar/result_templates/default.html
index f283693c3..3ed0f3122 100644
--- a/searx/templates/oscar/result_templates/default.html
+++ b/searx/templates/oscar/result_templates/default.html
@@ -1,4 +1,4 @@
-{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon %}
+{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon with context %}
{{ result_header(result, favicons) }}
{{ result_sub_header(result) }}
diff --git a/searx/templates/oscar/result_templates/images.html b/searx/templates/oscar/result_templates/images.html
index 1bfff0a1a..2d94ea6a5 100644
--- a/searx/templates/oscar/result_templates/images.html
+++ b/searx/templates/oscar/result_templates/images.html
@@ -1,6 +1,6 @@
{% from 'oscar/macros.html' import draw_favicon %}
-
+
@@ -20,8 +20,8 @@
{{ result.engine }}
{{ result.pretty_url }}
-
{{ _('Get image') }}
-
{{ _('View source') }}
+
{{ _('Get image') }}
+
{{ _('View source') }}