summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templatetags/projecttags.py')
-rw-r--r--bitbake/lib/toaster/toastergui/templatetags/projecttags.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
index 8028ae0022..e79a4e5848 100644
--- a/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
+++ b/bitbake/lib/toaster/toastergui/templatetags/projecttags.py
@@ -51,11 +51,11 @@ def get_tasks(queryset):
51 51
52 52
53@register.filter(name = "json") 53@register.filter(name = "json")
54def json(value): 54def json(value, default = None):
55 # JSON spec says that "\/" is functionally identical to "/" to allow for HTML-tag embedding in JSON strings 55 # JSON spec says that "\/" is functionally identical to "/" to allow for HTML-tag embedding in JSON strings
56 # unfortunately, I can't find any option in the json module to turn on forward-slash escaping, so we do 56 # unfortunately, I can't find any option in the json module to turn on forward-slash escaping, so we do
57 # it manually here 57 # it manually here
58 return mark_safe(JsonLib.dumps(value, ensure_ascii=False).replace('</', '<\\/')) 58 return mark_safe(JsonLib.dumps(value, default = default, ensure_ascii=False).replace('</', '<\\/'))
59 59
60@register.assignment_tag 60@register.assignment_tag
61def query(qs, **kwargs): 61def query(qs, **kwargs):