diff --git a/src/Resources/skeleton/twig/Extension.tpl.php b/src/Resources/skeleton/twig/Extension.tpl.php index d500b1ef0..32ae02e7f 100644 --- a/src/Resources/skeleton/twig/Extension.tpl.php +++ b/src/Resources/skeleton/twig/Extension.tpl.php @@ -11,6 +11,9 @@ class extends AbstractExtension public function getFilters(): array { return [ + // If your filter generates SAFE HTML, you should add a third + // parameter: ['is_safe' => ['html']] + // Reference: https://twig.symfony.com/doc/2.x/advanced.html#automatic-escaping new TwigFilter('filter_name', [$this, 'doSomething']), ]; }