diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py index 21eced0fb0..f5f6256f93 100644 --- a/django/contrib/admin/options.py +++ b/django/contrib/admin/options.py @@ -1001,7 +1001,7 @@ class ModelAdmin(BaseModelAdmin): 'adminform': adminForm, 'is_popup': "_popup" in request.REQUEST, 'show_delete': False, - 'media': mark_safe(media), + 'media': media, 'inline_admin_formsets': inline_admin_formsets, 'errors': helpers.AdminErrorList(form, formsets), 'app_label': opts.app_label, @@ -1093,7 +1093,7 @@ class ModelAdmin(BaseModelAdmin): 'object_id': object_id, 'original': obj, 'is_popup': "_popup" in request.REQUEST, - 'media': mark_safe(media), + 'media': media, 'inline_admin_formsets': inline_admin_formsets, 'errors': helpers.AdminErrorList(form, formsets), 'app_label': opts.app_label,