From: Arnaud Le Blanc Date: Sat, 27 Nov 2010 21:01:12 +0000 (+0100) Subject: updated doc for the pre_escape filter option X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=c34dee83f219c43cd5350b08c9535ce0850dfde0;p=konrad%2Ftwig.git updated doc for the pre_escape filter option --- 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 --------------------------