Browse code

added a note about autoescaping and concatenation in the doc

Fabien Potencier authored on 30/12/2010 08:17:01
Showing 1 changed files
... ...
@@ -407,6 +407,14 @@ Twig 0.9.9 and above):
407 407
         {{ var|escape('js') }} {# won't be double-escaped #}
408 408
         {% endautoescape %}
409 409
 
410
+.. note::
411
+
412
+    Note that autoescaping has some limitations as escaping is applied on
413
+    expressions after evaluation. For instance, when working with
414
+    concatenation, ``{{ foo|raw ~ bar }}`` won't give the expected result as
415
+    escaping is applied on the result of the concatenation, not on the
416
+    individual variables (so, the ``raw`` filter won't have any effect here).
417
+
410 418
 Sandbox Extension
411 419
 ~~~~~~~~~~~~~~~~~
412 420