From 18f772615b04343965c7589256219f2117cb1a0f Mon Sep 17 00:00:00 2001 From: Cqoicebordel Date: Wed, 10 Dec 2014 18:09:21 +0100 Subject: [PATCH 01/13] HTML Entities + Use the right template Courgette was using the wrong template. I assume it was a mistake. --- searx/templates/courgette/results.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/searx/templates/courgette/results.html b/searx/templates/courgette/results.html index d0b53b48a..62bef8c90 100644 --- a/searx/templates/courgette/results.html +++ b/searx/templates/courgette/results.html @@ -10,7 +10,7 @@
{{ _('Search URL') }}: - +
{{ _('Download results') }} @@ -43,9 +43,9 @@ {% for result in results %} {% if result['template'] %} - {% include 'default/result_templates/'+result['template'] %} + {% include 'courgette/result_templates/'+result['template'] %} {% else %} - {% include 'default/result_templates/default.html' %} + {% include 'courgette/result_templates/default.html' %} {% endif %} {% endfor %} From 74000c739dcc40e331df85d6219654ad06da100b Mon Sep 17 00:00:00 2001 From: Cqoicebordel Date: Wed, 10 Dec 2014 18:10:19 +0100 Subject: [PATCH 02/13] Alt on favicon --- searx/templates/courgette/result_templates/default.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/templates/courgette/result_templates/default.html b/searx/templates/courgette/result_templates/default.html index 734f9066c..5a8a78198 100644 --- a/searx/templates/courgette/result_templates/default.html +++ b/searx/templates/courgette/result_templates/default.html @@ -1,7 +1,7 @@
{% if result['favicon'] %} - + {{result['favicon']}} {% endif %}
From b043237c619597131be28ae9d3d0917a3f9b0d4a Mon Sep 17 00:00:00 2001 From: Cqoicebordel Date: Wed, 10 Dec 2014 18:11:20 +0100 Subject: [PATCH 03/13] Correct alt and title --- searx/templates/courgette/result_templates/images.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/templates/courgette/result_templates/images.html b/searx/templates/courgette/result_templates/images.html index 1f15ff2bb..ebda5380b 100644 --- a/searx/templates/courgette/result_templates/images.html +++ b/searx/templates/courgette/result_templates/images.html @@ -1,6 +1,6 @@ From eef05c3ddc0f3e719c4d4c3a5acbcc0351da46a9 Mon Sep 17 00:00:00 2001 From: Cqoicebordel Date: Wed, 10 Dec 2014 18:11:59 +0100 Subject: [PATCH 04/13] Alt on favicon --- searx/templates/courgette/result_templates/map.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/templates/courgette/result_templates/map.html b/searx/templates/courgette/result_templates/map.html index 734f9066c..5a8a78198 100644 --- a/searx/templates/courgette/result_templates/map.html +++ b/searx/templates/courgette/result_templates/map.html @@ -1,7 +1,7 @@
{% if result['favicon'] %} - + {{result['favicon']}} {% endif %}
From a809fd1bbb8a62b6a0f02f43e415f29b9af60f8c Mon Sep 17 00:00:00 2001 From: Cqoicebordel Date: Wed, 10 Dec 2014 18:14:29 +0100 Subject: [PATCH 05/13] Multiple HTML corrections Alt on favicon Width of image should be 400 and not 400px Correct alt+title on image No

contains

--- searx/templates/courgette/result_templates/videos.html | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/searx/templates/courgette/result_templates/videos.html b/searx/templates/courgette/result_templates/videos.html index 8ceb0b180..c8d1a39b6 100644 --- a/searx/templates/courgette/result_templates/videos.html +++ b/searx/templates/courgette/result_templates/videos.html @@ -1,12 +1,10 @@

{% if result['favicon'] %} - + {{result['favicon']}} {% endif %} -

{{ result.title|safe }}

{% if result.publishedDate %}

{{ result.publishedDate }}

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

{{ result.url }}

-

From 149e19c68a0918e40d5d5bffbdaa251676ac9c86 Mon Sep 17 00:00:00 2001 From: Cqoicebordel Date: Wed, 10 Dec 2014 18:15:39 +0100 Subject: [PATCH 06/13] Correct HTML entities and link --- searx/templates/default/results.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/templates/default/results.html b/searx/templates/default/results.html index 541983532..199eb1d96 100644 --- a/searx/templates/default/results.html +++ b/searx/templates/default/results.html @@ -10,7 +10,7 @@
{{ _('Search URL') }}: - +
{{ _('Download results') }} From 8708e5fc5630910e5a2e9f5e6683468889313f11 Mon Sep 17 00:00:00 2001 From: Cqoicebordel Date: Wed, 10 Dec 2014 18:16:32 +0100 Subject: [PATCH 07/13] Alt on favicons --- searx/templates/default/result_templates/default.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/templates/default/result_templates/default.html b/searx/templates/default/result_templates/default.html index d0e725ac5..c41c58fa1 100644 --- a/searx/templates/default/result_templates/default.html +++ b/searx/templates/default/result_templates/default.html @@ -1,5 +1,5 @@
-

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

+

{% 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 %}

From 2bb820c2816ca63c13756559993e650a77394ed9 Mon Sep 17 00:00:00 2001 From: Cqoicebordel Date: Wed, 10 Dec 2014 18:17:10 +0100 Subject: [PATCH 08/13] Correct alt and title --- searx/templates/default/result_templates/images.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/templates/default/result_templates/images.html b/searx/templates/default/result_templates/images.html index bead78c48..4c6d59e01 100644 --- a/searx/templates/default/result_templates/images.html +++ b/searx/templates/default/result_templates/images.html @@ -1,6 +1,6 @@ From 3e05570b327d8a296849cddd3643efb7d4fd289a Mon Sep 17 00:00:00 2001 From: Cqoicebordel Date: Wed, 10 Dec 2014 18:17:47 +0100 Subject: [PATCH 09/13] Alt on favicon --- searx/templates/default/result_templates/map.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/templates/default/result_templates/map.html b/searx/templates/default/result_templates/map.html index 78221aa01..dccec7a53 100644 --- a/searx/templates/default/result_templates/map.html +++ b/searx/templates/default/result_templates/map.html @@ -1,7 +1,7 @@
{% if result['favicon'] %} - + {{result['favicon']}} {% endif %}
From 94ea67547aeaaa76ea7345bb77fd0a607ca1da09 Mon Sep 17 00:00:00 2001 From: Cqoicebordel Date: Wed, 10 Dec 2014 18:20:20 +0100 Subject: [PATCH 10/13] HTML and usability corrections Put the result URL at the top, like in other results template Put the magnet link on the same line as the stats (peer/seed). --- searx/templates/default/result_templates/torrent.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/searx/templates/default/result_templates/torrent.html b/searx/templates/default/result_templates/torrent.html index 6c62793a5..5925f1313 100644 --- a/searx/templates/default/result_templates/torrent.html +++ b/searx/templates/default/result_templates/torrent.html @@ -1,7 +1,6 @@

{{ result.title|safe }}

- {% if result.content %}

{{ result.content|safe }}

{% endif %} -

Seed: {{ result.seed }}, Leech: {{ result.leech }}

-

magnet link

{{ result.pretty_url }}

+ {% if result.content %}

{{ result.content|safe }}

{% endif %} +

magnet link - Seed: {{ result.seed }}, Leech: {{ result.leech }}

From 5104552937057a60e63a1dc3002469954cf4a658 Mon Sep 17 00:00:00 2001 From: Cqoicebordel Date: Wed, 10 Dec 2014 18:21:41 +0100 Subject: [PATCH 11/13] Multiple HTML corrections Alt on favicon No

in

Correct alt and title on img --- searx/templates/default/result_templates/videos.html | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/searx/templates/default/result_templates/videos.html b/searx/templates/default/result_templates/videos.html index 233a6c021..0a89a67aa 100644 --- a/searx/templates/default/result_templates/videos.html +++ b/searx/templates/default/result_templates/videos.html @@ -1,8 +1,6 @@

-

-

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

+

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

{% if result.publishedDate %}

{{ result.publishedDate }}

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

{{ result.url }}

-

From 8fb6ea1bf12f6a167b8361795e234876f43d6273 Mon Sep 17 00:00:00 2001 From: Cqoicebordel Date: Wed, 10 Dec 2014 18:27:08 +0100 Subject: [PATCH 12/13] Add title and alt on image in infobox --- searx/templates/default/infobox.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/searx/templates/default/infobox.html b/searx/templates/default/infobox.html index d03b008f9..e99e9868b 100644 --- a/searx/templates/default/infobox.html +++ b/searx/templates/default/infobox.html @@ -1,6 +1,6 @@

{{ infobox.infobox }}

- {% if infobox.img_src %}{% endif %} + {% if infobox.img_src %}{{ infobox.infobox|striptags }}{% endif %}

{{ infobox.entity }}

{{ infobox.content | safe }}

{% if infobox.attributes %} @@ -42,3 +42,4 @@
+ name= From b2f5f655959597ff42ca908d401a6b5909d15eec Mon Sep 17 00:00:00 2001 From: Cqoicebordel Date: Sat, 13 Dec 2014 20:30:19 +0100 Subject: [PATCH 13/13] Correct test case Add the alt in favicon --- searx/tests/test_webapp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/tests/test_webapp.py b/searx/tests/test_webapp.py index 7771567f0..b922a3675 100644 --- a/searx/tests/test_webapp.py +++ b/searx/tests/test_webapp.py @@ -49,7 +49,7 @@ class ViewsTestCase(SearxTestCase): ) result = self.app.post('/', data={'q': 'test'}) self.assertIn( - '

First Test

', # noqa + '

youtubeFirst Test

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