[Fixed]-How to remove these '"' in django template


Change the line:

var jstree_jsondata={{json1}}


var jstree_jsondata={{ json1|safe }}

This uses the safe filter to tell Django that the contents should be output literally without changing characters to html entities. The reason for the name ‘safe’ is that you are declaring that the data to be output is safe and will not be the origin of potential cross site scripting attacks or html that will break your layout.

Leave a comment