projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
d35e19f
)
updated doc for the pre_escape filter option
author
Arnaud Le Blanc
<arnaud.lb@gmail.com>
Sat, 27 Nov 2010 21:01:12 +0000 (22:01 +0100)
committer
Fabien Potencier
<fabien.potencier@gmail.com>
Sun, 28 Nov 2010 07:14:37 +0000 (08:14 +0100)
doc/04-Extending-Twig.markdown
patch
|
blob
|
history
diff --git
a/doc/04-Extending-Twig.markdown
b/doc/04-Extending-Twig.markdown
index
f6d4833
..
02a60ac
100644
(file)
--- a/
doc/04-Extending-Twig.markdown
+++ b/
doc/04-Extending-Twig.markdown
@@
-343,6
+343,12
@@
set the `is_safe` option:
[php]
$filter = new Twig_Filter_Function('nl2br', array('is_safe' => array('html')));
+Some advanced filters may have to work on already escaped or safe values. In
+such a case, set the `pre_escape` option:
+
+ [php]
+ $filter = new Twig_Filter_Function('somefilter', array('pre_escape' => 'html', 'is_safe' => array('html')));
+
Overriding default Filters
--------------------------