Skip to content

Commit

Permalink
twig: Disable autoescape
Browse files Browse the repository at this point in the history
We don't need any escaping, because the Twig template engine only supplies escaping for web-related assets.

See the autoescape option described here: https://twig.symfony.com/doc/2.x/api.html#environment_options
  • Loading branch information
tdgroot committed May 2, 2023
1 parent 7101be1 commit c854984
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private function initApplication(Container $container): Application
private function registerTwigLoader(Container $container): void
{
$loader = new FilesystemLoader(__DIR__ . '/Resource/template');
$twig = new Environment($loader);
$twig = new Environment($loader, ['autoescape' => false]);
$container->set(Environment::class, $twig);
}

Expand Down

0 comments on commit c854984

Please sign in to comment.