Skip to content

Commit

Permalink
Merge pull request #65 from hylje/django20
Browse files Browse the repository at this point in the history
mark_for_escaping -> escape (django 2.0 compat)
  • Loading branch information
fdintino committed Feb 3, 2017
2 parents dd2accb + 5ce3f88 commit 4e283a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nested_admin/templatetags/nested_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from django.apps import apps
from django.conf import settings
from django.contrib.admin.options import InlineModelAdmin
from django.utils.safestring import mark_for_escaping, mark_safe
from django.utils.safestring import mark_safe
from django.utils.html import escape

register = template.Library()
Expand Down Expand Up @@ -63,7 +63,7 @@ def strip_parent_name(nested_name, parent_name):

@register.filter
def json_encode(data):
return mark_for_escaping(json.dumps(data))
return escape(json.dumps(data))

def json_else_list_tag(f):
"""
Expand Down

0 comments on commit 4e283a4

Please sign in to comment.