Skip to content

Commit

Permalink
Remove calls to mark_safe
Browse files Browse the repository at this point in the history
  • Loading branch information
mfraezz committed Sep 18, 2024
1 parent b09206e commit 65b1e69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions admin/base/filters.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from django import template
from django.utils.safestring import mark_safe
import json


Expand All @@ -8,4 +7,4 @@

@register.filter
def jsonify(o):
return mark_safe(json.dumps(o))
return json.dumps(o)
3 changes: 1 addition & 2 deletions admin/base/templatetags/filters.py
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 65b1e69

Please sign in to comment.