From: Fabien Potencier Date: Tue, 14 Dec 2010 15:38:11 +0000 (+0100) Subject: removed 'is_escaper' option for filters (a left over from the previous version) X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=148f82115e5aebd130c1d19084c872732ae7a76c;p=konrad%2Ftwig.git removed 'is_escaper' option for filters (a left over from the previous version) --- 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']; } }