I pass a variable to my twig template in Symfony2, this variable may contain html tags, I have tried to create an extension (function), but the variabl
Actually, you can use native PHP function strip_tags by following:
{{ var|striptags('')|raw }}
you can allow multiple tags with following code:
')|raw }}