diff --git a/django/contrib/admin/templates/admin/object_history.html b/django/contrib/admin/templates/admin/object_history.html
index 0dbe7af743..fc568305ca 100644
--- a/django/contrib/admin/templates/admin/object_history.html
+++ b/django/contrib/admin/templates/admin/object_history.html
@@ -24,8 +24,8 @@
{% for action in action_list %}
{{ action.action_time|date:_("DATE_WITH_TIME_FULL") }} |
- {{ action.user.username }}{% if action.user.first_name %} ({{ action.user.first_name }} {{ action.user.last_name }}){% endif %} |
- {{ action.change_message}} |
+ {{ action.user.username }}{% if action.user.first_name %} ({{ action.user.first_name|escape }} {{ action.user.last_name|escape }}){% endif %} |
+ {{ action.change_message|escape }} |
{% endfor %}