projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
ac7803f
)
added a note about autoescaping and concatenation in the doc
author
Fabien Potencier
<fabien.potencier@gmail.com>
Thu, 30 Dec 2010 08:17:01 +0000 (09:17 +0100)
committer
Fabien Potencier
<fabien.potencier@gmail.com>
Thu, 30 Dec 2010 10:20:19 +0000 (11:20 +0100)
doc/api.rst
patch
|
blob
|
history
diff --git
a/doc/api.rst
b/doc/api.rst
index
c3e6a47
..
fe69117
100644
(file)
--- 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
~~~~~~~~~~~~~~~~~