2011/3/11 Christophe COEVOET <[email protected]>:
> What is shown in the slides uses {{ field.errors }} or {{ field.widget }}
> which will be escaped as it is a call on a method of the object which cannot
> be declared as safe. so what is the way to use the TwigTheme which is not
> presented in your slides ?

"field" in the template refers to the renderer of the field. The
renderer has a connection to an instance of ThemeInterface. By
default, all renderers use a TwigTheme instance.

Now when a renderer renders anything using that TwigTheme (for example
when calling {{ field.errors }}), that method returns a Twig_Markup
instance. Twig makes sure not to escape this markup again.

Bernhard

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to