Escape JSON

This commit is contained in:
David Taylor
2016-10-04 21:05:07 +01:00
parent eb10c8e21f
commit 585f909d3f

View File

@@ -62,7 +62,8 @@ class EventOembed(generic.View):
'version': '1.0', 'version': '1.0',
'type': 'rich', 'type': 'rich',
} }
json = simplejson.dumps(data) # need to do this: @xframe_options_exempt
json = simplejson.JSONEncoderForHTML(data)
return HttpResponse(json, content_type="application/json") return HttpResponse(json, content_type="application/json")