diff --git a/searx/templates/courgette/result_templates/.code.html.swp b/searx/templates/courgette/result_templates/.code.html.swp new file mode 100644 index 000000000..b262ab703 Binary files /dev/null and b/searx/templates/courgette/result_templates/.code.html.swp differ diff --git a/searx/templates/courgette/result_templates/code.html b/searx/templates/courgette/result_templates/code.html index 382ce2a56..726f305cb 100644 --- a/searx/templates/courgette/result_templates/code.html +++ b/searx/templates/courgette/result_templates/code.html @@ -1,8 +1,8 @@
-

{% if result['favicon'] %}{{result['favicon']}}{% endif %}{{ result.title|safe }}

+

{% if result['favicon'] %}{{result['favicon']}}{% endif %}{{ result.title|safe }}

{% 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/courgette/result_templates/default.html b/searx/templates/courgette/result_templates/default.html index f5f5acef7..585ecf3f5 100644 --- a/searx/templates/courgette/result_templates/default.html +++ b/searx/templates/courgette/result_templates/default.html @@ -5,9 +5,9 @@ {% endif %}
-

{{ result.title|safe }}

+

{{ result.title|safe }}

{% if result.publishedDate %}{{ result.publishedDate }}{% endif %}

{% if result.content %}{{ result.content|safe }}
{% endif %}

{{ result.pretty_url }}‎

-
\ No newline at end of file + diff --git a/searx/templates/courgette/result_templates/images.html b/searx/templates/courgette/result_templates/images.html index 7228578e7..87fc7744c 100644 --- a/searx/templates/courgette/result_templates/images.html +++ b/searx/templates/courgette/result_templates/images.html @@ -1,6 +1,6 @@

- {{ result.title|striptags }} - {{ _('original context') }} + {{ result.title|striptags }} + {{ _('original context') }}

diff --git a/searx/templates/courgette/result_templates/map.html b/searx/templates/courgette/result_templates/map.html index f5f5acef7..585ecf3f5 100644 --- a/searx/templates/courgette/result_templates/map.html +++ b/searx/templates/courgette/result_templates/map.html @@ -5,9 +5,9 @@ {% endif %}
-

{{ result.title|safe }}

+

{{ result.title|safe }}

{% if result.publishedDate %}{{ result.publishedDate }}{% endif %}

{% if result.content %}{{ result.content|safe }}
{% endif %}

{{ result.pretty_url }}‎

- \ No newline at end of file + diff --git a/searx/templates/courgette/result_templates/torrent.html b/searx/templates/courgette/result_templates/torrent.html index b961eb09b..33b574244 100644 --- a/searx/templates/courgette/result_templates/torrent.html +++ b/searx/templates/courgette/result_templates/torrent.html @@ -2,12 +2,12 @@ {% if "icon_"~result.engine~".ico" in favicons %} {{result.engine}} {% endif %} -

{{ result.title|safe }}

+

{{ result.title|safe }}

{% if result.content %}{{ result.content|safe }}
{% endif %} {{ _('Seeder') }} : {{ result.seed }}, {{ _('Leecher') }} : {{ result.leech }}
{% if result.magnetlink %}{{ _('magnet link') }}{% endif %} - {% if result.torrentfile %}{{ _('torrent file') }}{% endif %} + {% if result.torrentfile %}{{ _('torrent file') }}{% endif %}

{{ result.pretty_url }}‎

- \ No newline at end of file + diff --git a/searx/templates/courgette/result_templates/videos.html b/searx/templates/courgette/result_templates/videos.html index 4e0174ba6..ceed8b28f 100644 --- a/searx/templates/courgette/result_templates/videos.html +++ b/searx/templates/courgette/result_templates/videos.html @@ -3,8 +3,8 @@ {{result.engine}} {% endif %} -

{{ result.title|safe }}

+

{{ result.title|safe }}

{% if result.publishedDate %}{{ result.publishedDate }}
{% endif %} - {{ result.title|striptags }} + {{ result.title|striptags }}

{{ result.pretty_url }}‎

diff --git a/searx/templates/default/infobox.html b/searx/templates/default/infobox.html index 50f5e098e..1733f7753 100644 --- a/searx/templates/default/infobox.html +++ b/searx/templates/default/infobox.html @@ -17,7 +17,7 @@
diff --git a/searx/templates/default/result_templates/code.html b/searx/templates/default/result_templates/code.html index 78eda1884..ad1d97e9e 100644 --- a/searx/templates/default/result_templates/code.html +++ b/searx/templates/default/result_templates/code.html @@ -1,9 +1,9 @@
-

{% if result['favicon'] %}{{result['favicon']}}{% endif %}{{ result.title|safe }}

-

{{ result.pretty_url }}‎ {{ _('cached') }}

+

{% if result['favicon'] %}{{result['favicon']}}{% 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 %}

- {% 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 4cbf231f1..89091e280 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 %}{{result.engine}}{% endif %}{{ result.title|safe }}

-

{{ result.pretty_url }}‎ {{ _('cached') }} +

{% if "icon_"~result.engine~".ico" in favicons %}{{result.engine}}{% 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 e06dcc194..d85f841ae 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 e2d00f920..d413742e7 100644 --- a/searx/templates/default/result_templates/map.html +++ b/searx/templates/default/result_templates/map.html @@ -5,8 +5,8 @@ {% endif %}
-

{{ result.title|safe }}

-

{{ result.pretty_url }}‎ {{ _('cached') }} +

{{ 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/torrent.html b/searx/templates/default/result_templates/torrent.html index b91babfc6..4b2522ad0 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 %} {{result.engine}} {% endif %} -

{{ result.title|safe }}

+

{{ result.title|safe }}

{{ 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 b85b4cf5a..5a377b70f 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 %}{{result.engine}}{% endif %}{{ result.title|safe }}

+

{% if "icon_"~result.engine~".ico" in favicons %}{{result.engine}}{% endif %}{{ result.title|safe }}

{% if result.publishedDate %}{{ result.publishedDate }}
{% endif %} - {{ result.title|striptags }} + {{ result.title|striptags }}

{{ result.url }}‎

diff --git a/searx/templates/oscar/infobox.html b/searx/templates/oscar/infobox.html index 1aa2e5c11..2abdbf0ec 100644 --- a/searx/templates/oscar/infobox.html +++ b/searx/templates/oscar/infobox.html @@ -20,7 +20,7 @@ {% if infobox.urls %}
{% for url in infobox.urls %} -

{{ url.title }}

+

{{ url.title }}

{% endfor %}
{% endif %} diff --git a/searx/templates/oscar/macros.html b/searx/templates/oscar/macros.html index feb9ba942..5866c132c 100644 --- a/searx/templates/oscar/macros.html +++ b/searx/templates/oscar/macros.html @@ -11,15 +11,15 @@ {% macro result_header(result, favicons) -%} -

{% if result.engine~".png" in favicons %}{{ draw_favicon(result.engine) }} {% endif %}{{ result.title|safe }}

+

{% if result.engine~".png" in favicons %}{{ draw_favicon(result.engine) }} {% endif %}{{ result.title|safe }}

{%- endmacro %} {% macro result_sub_header(result) -%} {% if result.publishedDate %}{% endif %} - {{ icon('link') }} {{ _('cached') }} + {{ icon('link') }} {{ _('cached') }} {% if result.magnetlink %}{{ icon('magnet') }} {{ _('magnet link') }}{% endif %} - {% if result.torrentfile %}{{ icon('download-alt') }} {{ _('torrent file') }}{% endif %} + {% if result.torrentfile %}{{ icon('download-alt') }} {{ _('torrent file') }}{% endif %} {%- endmacro %} diff --git a/searx/templates/oscar/result_templates/code.html b/searx/templates/oscar/result_templates/code.html index 6890c7851..582a2149c 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.content|safe }}

{% endif %} -{% if result.repository %}

{{ icon('file') }} {{ result.repository }}

{% endif %} +{% if result.repository %}

{{ icon('file') }} {{ result.repository }}

{% endif %}
{{ result.codelines|code_highlighter(result.code_language)|safe }} diff --git a/searx/templates/oscar/result_templates/images.html b/searx/templates/oscar/result_templates/images.html index 3f39ca6da..1bfff0a1a 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 %} - + {{ result.title|striptags }} @@ -20,8 +20,8 @@ {{ result.engine }}

{{ result.pretty_url }}

- {{ _('Get image') }} - {{ _('View source') }} + {{ _('Get image') }} + {{ _('View source') }}
diff --git a/searx/templates/oscar/result_templates/videos.html b/searx/templates/oscar/result_templates/videos.html index ddf2894ac..af4841453 100644 --- a/searx/templates/oscar/result_templates/videos.html +++ b/searx/templates/oscar/result_templates/videos.html @@ -15,7 +15,7 @@
- {{ result.title|striptags }} {{ result.engine }} + {{ result.title|striptags }} {{ result.engine }} {% if result.content %}

{{ result.content|safe }}

{% endif %}
diff --git a/searx/templates/pix-art/result_templates/default.html b/searx/templates/pix-art/result_templates/default.html index 60ff502c8..ada81e5a3 100644 --- a/searx/templates/pix-art/result_templates/default.html +++ b/searx/templates/pix-art/result_templates/default.html @@ -1,6 +1,7 @@ - + \ No newline at end of file + + diff --git a/searx/templates/pix-art/result_templates/images.html b/searx/templates/pix-art/result_templates/images.html index e06dcc194..d85f841ae 100644 --- a/searx/templates/pix-art/result_templates/images.html +++ b/searx/templates/pix-art/result_templates/images.html @@ -1,6 +1,6 @@

- {{ result.title|striptags }} - {{ _('original context') }} + {{ result.title|striptags }} + {{ _('original context') }}

diff --git a/searx/tests/test_webapp.py b/searx/tests/test_webapp.py index 32eff5fa5..471ec2f2d 100644 --- a/searx/tests/test_webapp.py +++ b/searx/tests/test_webapp.py @@ -47,7 +47,7 @@ class ViewsTestCase(SearxTestCase): def test_index_html(self): result = self.app.post('/', data={'q': 'test'}) self.assertIn( - '

youtubeSecond Test

', # noqa + '

youtubeSecond Test

', # noqa result.data ) self.assertIn(