Add escape_once to gallery title and alt text

This commit is contained in:
iBug
2025-07-20 23:02:54 +08:00
committed by Steffen Illium
parent c8f52d1935
commit 2886f94d58

View File

@@ -20,13 +20,13 @@
{% for img in gallery %}
{% if img.url %}
<a href="{{ img.url | relative_url }}"
{% if img.title %}title="{{ img.title }}"{% endif %}>
{% if img.title %}title="{{ img.title | escape_once }}"{% endif %}>
<img src="{{ img.image_path | relative_url }}"
alt="{% if img.alt %}{{ img.alt }}{% endif %}">
alt="{% if img.alt %}{{ img.alt | escape_once }}{% endif %}">
</a>
{% else %}
<img src="{{ img.image_path | relative_url }}"
alt="{% if img.alt %}{{ img.alt }}{% endif %}">
alt="{% if img.alt %}{{ img.alt | escape_once }}{% endif %}">
{% endif %}
{% endfor %}
{% if include.caption %}