home ~ projects ~ socials

Turn Off Auto-Escaping In Rust's Minijinja

TL;DR

Use this to disable auto-escaping

{% autoescape false %}
  This will be a literal & instead of
  turning into &
{% endautoescape %}

I've been using Minijinja for templating of Neopolitan. By default, it'll escape things like ampersands which works great move of the time. It causes issues though, when you're trying to do javascript. /

You can disable the auto escape like this:

-- end of line --