How can disable autoescape for a Jinja block?

Hello team,

I’m using ERPNext v6 and need to print the content of a variable as HTML, just a table, so my question is how can I:

{% autoescape false %}
 {{ html_variable }}
{% endscape %}

If I try that, an error occur TemplateSyntaxError: Encountered unknown tag 'autoescape'.

Is different on ERPNext/Frappè ?


autoescape extension is not available on Frappè right now. But you can try to hack into file and add it.

Thanks @KanchanChauhan, but my ERPNext’s lead wants to avoid change backend code as much as we can.

So my workaround was to create a complete custom format instead just add a custom HTML block.


1 Like