I created a custom tag which should work like that:
{{ thumbnail(image.fullPath,620) }}
unfortunately I have to use it like that
{{ thumbnail(image.fullPath,620)|raw }}
Is there a way to unescape directly in the twig extension?
My extension registers the thumbnail code like this:
public function getFunctions()
{
return array(
'thumbnail' => new \Twig_Function_Method($this, 'thumbnail'),
);
}
The third argument of
Twig_Function_Method::__construct()is an array of options for the function. One of these options isis_safewhich specifies whether function outputs “safe” HTML/JavaScript code: