From c456666b0cd7da1ba7664d1bf44cc801857f2933 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Thu, 30 Dec 2010 09:17:01 +0100 Subject: [PATCH] added a note about autoescaping and concatenation in the doc --- doc/api.rst | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) 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 ~~~~~~~~~~~~~~~~~ -- 1.7.2.5