summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-01-04 10:12:06 -0500
committerTim Graham <timograham@gmail.com>2017-01-04 10:22:17 -0500
commit8ea541e6a297d6bcdef233871a22b5cc99a0a527 (patch)
treedfccaae357acb067415fee8585ccdf13af246263 /django
parentbff4abacad48eba715be64d7b15582d15bdc1fca (diff)
Refs #2856 -- Removed redundant escaping in admin's "Perhaps it was deleted?" message.
Diffstat (limited to 'django')
-rw-r--r--django/contrib/admin/options.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py
index 3a813c04f1..aef1e2c24e 100644
--- a/django/contrib/admin/options.py
+++ b/django/contrib/admin/options.py
@@ -41,7 +41,7 @@ from django.urls import reverse
from django.utils import six
from django.utils.decorators import method_decorator
from django.utils.encoding import force_text, python_2_unicode_compatible
-from django.utils.html import escape, format_html
+from django.utils.html import format_html
from django.utils.http import urlencode, urlquote
from django.utils.safestring import mark_safe
from django.utils.text import capfirst, format_lazy, get_text_list
@@ -1394,9 +1394,9 @@ class ModelAdmin(BaseModelAdmin):
Create a message informing the user that the object doesn't exist
and return a redirect to the admin index page.
"""
- msg = _("%(name)s with ID %(key)s doesn't exist. Perhaps it was deleted?") % {
+ msg = _("""%(name)s with ID "%(key)s" doesn't exist. Perhaps it was deleted?""") % {
'name': force_text(opts.verbose_name),
- 'key': escape(object_id),
+ 'key': unquote(object_id),
}
self.message_user(request, msg, messages.WARNING)
url = reverse('admin:index', current_app=self.admin_site.name)