diff --git a/_layouts/home.html b/_layouts/home.html
index fa2f58e..ccc08f2 100644
--- a/_layouts/home.html
+++ b/_layouts/home.html
@@ -63,7 +63,7 @@ refactor: true
{% assign src = post.img_path | append: '/' | append: src | replace: '//', '/' %}
{% endunless %}
- {% assign alt = post.image.alt | default: 'Preview Image' %}
+ {% assign alt = post.image.alt | xml_escape | default: 'Preview Image' %}
{% endif %}
diff --git a/_layouts/post.html b/_layouts/post.html
index 1821975..77822a6 100644
--- a/_layouts/post.html
+++ b/_layouts/post.html
@@ -31,7 +31,7 @@ tail_includes:
{% if page.image %}
{% capture src %}src="{{ page.image.path | default: page.image }}"{% endcapture %}
{% capture class %}class="preview-img{% if page.image.no_bg %}{{ ' no-bg' }}{% endif %}"{% endcapture %}
- {% capture alt %}alt="{{ page.image.alt | default: "Preview Image" }}"{% endcapture %}
+ {% capture alt %}alt="{{ page.image.alt | xml_escape | default: "Preview Image" }}"{% endcapture %}
{% capture lqip %}
{% if page.image.lqip %}