removed 'is_escaper' option for filters (a left over from the previous version)
authorFabien Potencier <fabien.potencier@gmail.com>
Tue, 14 Dec 2010 15:38:11 +0000 (16:38 +0100)
committerFabien Potencier <fabien.potencier@gmail.com>
Tue, 14 Dec 2010 15:38:11 +0000 (16:38 +0100)
CHANGELOG
lib/Twig/Filter.php

index 1275fa0..0159a8a 100644 (file)
--- 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
index 1904d74..2e1ddcb 100644 (file)
@@ -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'];
     }
 }