diff --git a/sphinx_rtd_theme/footer.html b/sphinx_rtd_theme/footer.html
index 33fe683a9..e1b99c5a4 100644
--- a/sphinx_rtd_theme/footer.html
+++ b/sphinx_rtd_theme/footer.html
@@ -36,7 +36,8 @@
{# Translators: the phrase "revision" comes from Git, referring to a commit #}
{% trans %}Revision{% endtrans %} {{ commit }}
.
- {%- elif last_updated %}
+ {%- endif %}
+ {%- if last_updated %}
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}