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 = new \Twig_Environment($loaders, [ |
|
'debug' => $this->config['debug'], |
|
'autoescape' => $this->config['autoescape'], |
In Twig 1:
true is the same as html and uses that escaping strategy
false 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.
Thanks for a very useful project!
Currently there's a boolean configuration option called
autoescapethat gets passed directly to\Twig\Environment::__construct()intwig-renderer/src/TwigRenderer.php
Lines 50 to 52 in 4b09a3f
In Twig 1:
trueis the same ashtmland uses that escaping strategyfalsedisables auto-escapingIn Twig 2
truewas removed as an option (so to get the oldtruebehaviour you should passhtml).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.