diff --git a/django/contrib/admin/templates/admin/delete_confirmation.html b/django/contrib/admin/templates/admin/delete_confirmation.html
index 71d3eb9f0fb..c1a711534d6 100644
--- a/django/contrib/admin/templates/admin/delete_confirmation.html
+++ b/django/contrib/admin/templates/admin/delete_confirmation.html
@@ -7,7 +7,7 @@
{% trans 'Home' %}
› {{ app_label|capfirst }}
› {{ opts.verbose_name_plural|capfirst|escape }}
-› {{ object|truncatewords:"18" }}
+› {{ object|truncatewords:"18" }}
› {% trans 'Delete' %}
{% endblock %}
diff --git a/django/contrib/admin/templates/admin/object_history.html b/django/contrib/admin/templates/admin/object_history.html
index c8169a6c3be..55dd4a3b4c8 100644
--- a/django/contrib/admin/templates/admin/object_history.html
+++ b/django/contrib/admin/templates/admin/object_history.html
@@ -7,7 +7,7 @@
{% trans 'Home' %}
› {{ app_label|capfirst|escape }}
› {{ module_name }}
-› {{ object|truncatewords:"18" }}
+› {{ object|truncatewords:"18" }}
› {% trans 'History' %}
{% endblock %}
diff --git a/django/contrib/admin/templatetags/admin_urls.py b/django/contrib/admin/templatetags/admin_urls.py
index 53dc65b5674..90e81b0ef3d 100644
--- a/django/contrib/admin/templatetags/admin_urls.py
+++ b/django/contrib/admin/templatetags/admin_urls.py
@@ -1,8 +1,14 @@
-from django.core.urlresolvers import reverse, NoReverseMatch
+from django.core.urlresolvers import reverse
from django import template
+from django.contrib.admin.util import quote
register = template.Library()
@register.filter
def admin_urlname(value, arg):
return 'admin:%s_%s_%s' % (value.app_label, value.module_name, arg)
+
+
+@register.filter
+def admin_urlquote(value):
+ return quote(value)