From 65b1e699a3bd7b2ae10cff2c9e59910068a9baf7 Mon Sep 17 00:00:00 2001 From: Matt Frazier Date: Wed, 18 Sep 2024 13:26:00 -0400 Subject: [PATCH] Remove calls to mark_safe --- admin/base/filters.py | 3 +-- admin/base/templatetags/filters.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/admin/base/filters.py b/admin/base/filters.py index 19ba7fb8bce..f0107e9cc3c 100644 --- a/admin/base/filters.py +++ b/admin/base/filters.py @@ -1,5 +1,4 @@ from django import template -from django.utils.safestring import mark_safe import json @@ -8,4 +7,4 @@ @register.filter def jsonify(o): - return mark_safe(json.dumps(o)) + return json.dumps(o) diff --git a/admin/base/templatetags/filters.py b/admin/base/templatetags/filters.py index a3a72b9cd4a..38efad3a0fe 100644 --- a/admin/base/templatetags/filters.py +++ b/admin/base/templatetags/filters.py @@ -1,10 +1,9 @@ # h/t https://djangosnippets.org/snippets/1250/ from django import template -from django.utils.safestring import mark_safe import json register = template.Library() @register.filter def jsonify(o): - return mark_safe(json.dumps(o)) + return json.dumps(o)