Fix autoescaping for Twig 2.x
andriokha opened this issue · 0 comments
andriokha commented
Thanks for a very useful project!
Currently there's a boolean configuration option called autoescape
that gets passed directly to \Twig\Environment::__construct()
in
twig-renderer/src/TwigRenderer.php
Lines 50 to 52 in 4b09a3f
In Twig 1:
true
is the same ashtml
and uses that escaping strategyfalse
disables auto-escaping
In Twig 2 true
was removed as an option (so to get the old true
behaviour you should pass html
).
It occurred to me that we could expose the full range of options, but I'm not sure if there's really any demand for that.