Skip to content

Commit c9a7eb6

Browse files
committed
Add escape_once to gallery title and alt text
1 parent 2f8c4e6 commit c9a7eb6

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
- Add HTML escaping for some titles, labels and metada that was missing. (#5276)
99
- Add optional `footer.since` for copyright time range. (#5275)
1010

11+
### Bug Fixes
12+
13+
- Add `escape_once` to gallery title and alt text.
14+
1115
## [4.27.1](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.27.1)
1216

1317
### Enhancements

_includes/gallery

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020
{% for img in gallery %}
2121
{% if img.url %}
2222
<a href="{{ img.url | relative_url }}"
23-
{% if img.title %}title="{{ img.title }}"{% endif %}>
23+
{% if img.title %}title="{{ img.title | escape_once }}"{% endif %}>
2424
<img src="{{ img.image_path | relative_url }}"
25-
alt="{% if img.alt %}{{ img.alt }}{% endif %}">
25+
alt="{% if img.alt %}{{ img.alt | escape_once }}{% endif %}">
2626
</a>
2727
{% else %}
2828
<img src="{{ img.image_path | relative_url }}"
29-
alt="{% if img.alt %}{{ img.alt }}{% endif %}">
29+
alt="{% if img.alt %}{{ img.alt | escape_once }}{% endif %}">
3030
{% endif %}
3131
{% endfor %}
3232
{% if include.caption %}

docs/_docs/18-history.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ permalink: "/docs/history/"
55
excerpt: Change log of enhancements and bug fixes made to the theme.
66
sidebar:
77
nav: docs
8-
last_modified_at: '2025-07-11T09:48:51+08:00'
8+
last_modified_at: '2025-07-20T23:02:43+08:00'
99
toc: false
1010
---
1111

@@ -23,6 +23,10 @@ toc: false
2323
- Add HTML escaping for some titles, labels and metada that was missing. [#5276](https://github.com/mmistakes/minimal-mistakes/issues/5276)
2424
- Add optional `footer.since` for copyright time range. [#5275](https://github.com/mmistakes/minimal-mistakes/issues/5275)
2525

26+
### Bug Fixes
27+
28+
- Add `escape_once` to gallery title and alt text.
29+
2630
## [4.27.1](https://github.com/mmistakes/minimal-mistakes/releases/tag/4.27.1)
2731

2832
### Enhancements

0 commit comments

Comments
 (0)