diff --git a/searx/templates/courgette/base.html b/searx/templates/courgette/base.html index 58957335..276fae87 100644 --- a/searx/templates/courgette/base.html +++ b/searx/templates/courgette/base.html @@ -5,6 +5,7 @@ + {% block title %}{% endblock %}searx @@ -39,4 +40,4 @@ - \ No newline at end of file + 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 00000000..b262ab70 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 382ce2a5..726f305c 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 f5f5acef..585ecf3f 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 7228578e..87fc7744 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 f5f5acef..585ecf3f 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 b961eb09..33b57424 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 4e0174ba..ceed8b28 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/base.html b/searx/templates/default/base.html index fa96d943..143bdb8d 100644 --- a/searx/templates/default/base.html +++ b/searx/templates/default/base.html @@ -5,6 +5,7 @@ + {% block title %}{% endblock %}searx diff --git a/searx/templates/default/infobox.html b/searx/templates/default/infobox.html index 50f5e098..1733f775 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 78eda188..ad1d97e9 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 4cbf231f..89091e28 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 e06dcc19..d85f841a 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 e2d00f92..d413742e 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 b91babfc..4b2522ad 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 b85b4cf5..5a377b70 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/base.html b/searx/templates/oscar/base.html index 88eedc99..a799376f 100644 --- a/searx/templates/oscar/base.html +++ b/searx/templates/oscar/base.html @@ -6,6 +6,7 @@ + {% block meta %}{% endblock %} {% block title %}{% endblock %}searx diff --git a/searx/templates/oscar/infobox.html b/searx/templates/oscar/infobox.html index 1aa2e5c1..2abdbf0e 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 feb9ba94..5866c132 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 6890c785..582a2149 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 3f39ca6d..1bfff0a1 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 ddf2894a..af484145 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/base.html b/searx/templates/pix-art/base.html index 23bcf44e..578180c8 100644 --- a/searx/templates/pix-art/base.html +++ b/searx/templates/pix-art/base.html @@ -5,6 +5,7 @@ + {% block title %}{% endblock %}searx diff --git a/searx/templates/pix-art/result_templates/default.html b/searx/templates/pix-art/result_templates/default.html index 60ff502c..ada81e5a 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 e06dcc19..d85f841a 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 32eff5fa..471ec2f2 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(