From c34dee83f219c43cd5350b08c9535ce0850dfde0 Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Sat, 27 Nov 2010 22:01:12 +0100 Subject: [PATCH] updated doc for the pre_escape filter option --- doc/04-Extending-Twig.markdown | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/doc/04-Extending-Twig.markdown b/doc/04-Extending-Twig.markdown index f6d4833..02a60ac 100644 --- 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 -------------------------- -- 1.7.2.5