瀏覽代碼

Add title and alt on image in infobox

Cqoicebordel 10 年之前
父節點
當前提交
8fb6ea1bf1
共有 1 個檔案被更改,包括 2 行新增1 行删除
  1. 2
    1
      searx/templates/default/infobox.html

+ 2
- 1
searx/templates/default/infobox.html 查看文件

@@ -1,6 +1,6 @@
1 1
 <div class="infobox">
2 2
   <h2>{{ infobox.infobox }}</h2>
3
-  {% if infobox.img_src %}<img src="{{ infobox.img_src }}" />{% endif %}
3
+  {% if infobox.img_src %}<img src="{{ infobox.img_src }}" title="{{ infobox.infobox|striptags }}" alt="{{ infobox.infobox|striptags }}" />{% endif %}
4 4
   <p>{{ infobox.entity }}</p>
5 5
   <p>{{ infobox.content | safe }}</p>
6 6
   {% if infobox.attributes %}
@@ -42,3 +42,4 @@
42 42
   <br />
43 43
   
44 44
 </div>
45
+ name=