From: Fabien Potencier Date: Thu, 30 Dec 2010 08:17:01 +0000 (+0100) Subject: added a note about autoescaping and concatenation in the doc X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=c456666b0cd7da1ba7664d1bf44cc801857f2933;p=web%2Fkonrad%2Ftwig.git added a note about autoescaping and concatenation in the doc --- diff --git a/doc/api.rst b/doc/api.rst index c3e6a47..fe69117 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -407,6 +407,14 @@ Twig 0.9.9 and above): {{ var|escape('js') }} {# won't be double-escaped #} {% endautoescape %} +.. note:: + + Note that autoescaping has some limitations as escaping is applied on + expressions after evaluation. For instance, when working with + concatenation, ``{{ foo|raw ~ bar }}`` won't give the expected result as + escaping is applied on the result of the concatenation, not on the + individual variables (so, the ``raw`` filter won't have any effect here). + Sandbox Extension ~~~~~~~~~~~~~~~~~