when I use
{% autoescape "json" %}
{
"key" : "hellü"
}
{% endautoescape %}
the result is
{
"key" : "hell\u00FC"
}
But I dont want the strings encoded to unicode entities when I'm already creating a utf8 text file with this json string in it - it is just unneeded and unwanted.
The result should just be this:
{
"key" : "hellü"
}
Any idea how to disable unicode entities in escape json function?
When you see the
\urepresentation - that is escaping (not entities). So by usingautoescapeyou escaped the json and that is good practice to avoid XSS variabilities.If you still want to disable the autoEscaping you can do:
For the full documentation: https://pebbletemplates.io/wiki/guide/escaping/