From 417097b315d0b162ddd5f497d88179b8c56901e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Tue, 31 May 2022 10:53:28 +0200 Subject: [PATCH] templatetags: remove duplicate json_script tag --- combo_plugin_gnm/templatetags/gnm.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/combo_plugin_gnm/templatetags/gnm.py b/combo_plugin_gnm/templatetags/gnm.py index 4d4bf15..fd9f641 100644 --- a/combo_plugin_gnm/templatetags/gnm.py +++ b/combo_plugin_gnm/templatetags/gnm.py @@ -821,20 +821,6 @@ def gnm_airquality_map(context): return context -_json_script_escapes = { - ord('>'): '\\u003E', - ord('<'): '\\u003C', - ord('&'): '\\u0026', -} - - -@register.filter(is_safe=True) -def json_script(value, element_id): - json_str = json.dumps(value, cls=DjangoJSONEncoder) - json_str = json_str.replace('>', '\\u003E').replace('<', '\\u003C').replace('&', '\\u0026') - return format_html('', element_id, mark_safe(json_str)) - - @register.simple_tag def get_goto_cell(page, request): try: