From 8fbffb1409b91a76fb4228456442b661e43caa72 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Thu, 25 Nov 2021 12:04:39 +0100 Subject: [fix] simple-theme templates: polish HTML elements - [1] element does not have an end tag, no need for a leading `/>` - add global attribute title[2] to result_templates/images.html (result-images-source) - in jinja macro 'macro result_header' remove duplicate of class="image" - in jinja macro 'macro result_header' remove alt attribute (fix [3]):: alt="{{ result.title|striptags }}" the result.title is already shown in::

{{ result_link(result.url, result.title|safe) }}

[1] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img [2] https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-title [3] https://github.com/searxng/searxng/issues/523 Closes: https://github.com/searxng/searxng/issues/523 Signed-off-by: Markus Heiser --- searx/templates/simple/macros.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'searx/templates/simple/macros.html') diff --git a/searx/templates/simple/macros.html b/searx/templates/simple/macros.html index 7a3a4ff9f..3920da2b3 100644 --- a/searx/templates/simple/macros.html +++ b/searx/templates/simple/macros.html @@ -1,6 +1,6 @@ {% macro draw_favicon(favicon) -%} - {{ favicon }} + {{ favicon }} {%- endmacro %} {% macro result_open_link(url, classes='') -%} @@ -23,8 +23,8 @@ {{- part -}} {%- endfor %} {{- result_close_link() -}} - {%- if result.img_src %}{{ result_open_link(result.url) }}{{ result.title|striptags }}{{ result_close_link() }}{% endif -%} - {%- if result.thumbnail %}{{ result_open_link(result.url) }}{{ result.title|striptags }}{{ result_close_link() }}{% endif -%} + {%- if result.img_src %}{{ result_open_link(result.url) }}{{ result_close_link() }}{% endif -%} + {%- if result.thumbnail %}{{ result_open_link(result.url) }}{{ result_close_link() }}{% endif -%}

{{ result_link(result.url, result.title|safe) }}

{%- endmacro -%} -- cgit v1.2.3