summaryrefslogtreecommitdiff
path: root/searx/templates/simple/result_templates
diff options
context:
space:
mode:
authormrpaulblack <paul@paulgo.io>2021-11-22 00:32:04 +0100
committerMarkus Heiser <markus.heiser@darmarit.de>2021-11-23 14:13:36 +0100
commit047d0ac6d630da4f1aa119b86671ce144bd3298d (patch)
treee68dad71f9f93d457d8c8a54738b3849aa3a0838 /searx/templates/simple/result_templates
parentfbd8afb93d60c5fe6479cfd715e6f1713ff91c2d (diff)
downloadsearxng-047d0ac6d630da4f1aa119b86671ce144bd3298d.tar.gz
searxng-047d0ac6d630da4f1aa119b86671ce144bd3298d.zip
[simple template] return a default string if there is no description
Diffstat (limited to 'searx/templates/simple/result_templates')
-rw-r--r--searx/templates/simple/result_templates/default.html2
-rw-r--r--searx/templates/simple/result_templates/videos.html4
2 files changed, 4 insertions, 2 deletions
diff --git a/searx/templates/simple/result_templates/default.html b/searx/templates/simple/result_templates/default.html
index 8cd985b1b..7c26f0654 100644
--- a/searx/templates/simple/result_templates/default.html
+++ b/searx/templates/simple/result_templates/default.html
@@ -6,7 +6,7 @@
<p class="altlink"> &bull; <a class="btn-collapse collapsed media-loader disabled_if_nojs" data-target="#result-media-{{ index }}" data-btn-text-collapsed="{{ _('show media') }}" data-btn-text-not-collapsed="{{ _('hide media') }}">{{ icon('music-note') }} {{ _('show media') }}</a></p>
{%- endif %}
<p class="content">
- {%- if result.content %}{{ result.content|safe }}{% endif -%}
+ {%- if result.content %}{{ result.content|safe }}{%- else %}{{ _('This site did not provide any description.')|safe }}{% endif -%}
</p>
{{- result_sub_footer(result, proxify) -}}
{% if result.embedded -%}
diff --git a/searx/templates/simple/result_templates/videos.html b/searx/templates/simple/result_templates/videos.html
index 8127b3d4e..81b88c4d9 100644
--- a/searx/templates/simple/result_templates/videos.html
+++ b/searx/templates/simple/result_templates/videos.html
@@ -5,7 +5,9 @@
{% if result.embedded -%}
<p class="altlink"> &bull; <a class="btn-collapse collapsed media-loader disabled_if_nojs" data-target="#result-video-{{ index }}" data-btn-text-collapsed="{{ _('show video') }}" data-btn-text-not-collapsed="{{ _('hide video') }}">{{ icon('film-outline') }} {{ _('show video') }}</a></p>
{%- endif %}
-{% if result.content %}<p class="content">{{ result.content|safe }}</p>{% endif %}
+<p class="content">
+ {%- if result.content %}{{ result.content|safe }}{%- else %}{{ _('This site did not provide any description.')|safe }}{% endif -%}
+</p>
{{- result_sub_footer(result, proxify) -}}
{% if result.embedded -%}
<div id="result-video-{{ index }}" class="invisible">