From 148f82115e5aebd130c1d19084c872732ae7a76c Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 14 Dec 2010 16:38:11 +0100 Subject: [PATCH] removed 'is_escaper' option for filters (a left over from the previous version) --- CHANGELOG | 1 + lib/Twig/Filter.php | 12 ++---------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 1275fa0..0159a8a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -15,6 +15,7 @@ Backward incompatibilities: Changes: + * removed 'is_escaper' option for filters (a left over from the previous version) -- you must use 'is_safe' now instead * fixed usage of operators as method names (like is, in, and not) * changed the order of execution for node visitors * fixed default() filter behavior when used with strict_variables set to on diff --git a/lib/Twig/Filter.php b/lib/Twig/Filter.php index 1904d74..2e1ddcb 100644 --- a/lib/Twig/Filter.php +++ b/lib/Twig/Filter.php @@ -23,12 +23,8 @@ abstract class Twig_Filter implements Twig_FilterInterface { $this->options = array_merge(array( 'needs_environment' => false, + 'pre_escape' => null, ), $options); - - if (isset($this->options['is_escaper'])) { - $this->options['is_safe'] = array('html'); - unset($this->options['is_escaper']); - } } public function needsEnvironment() @@ -51,10 +47,6 @@ abstract class Twig_Filter implements Twig_FilterInterface public function getPreEscape() { - if (isset($this->options['pre_escape'])) { - return $this->options['pre_escape']; - } - - return null; + return $this->options['pre_escape']; } } -- 1.7.2.5