mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-13 19:06:40 +00:00
removed 'is_escaper' option for filters (a left over from the previous version)
This commit is contained in:
@@ -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
|
||||
|
||||
+2
-10
@@ -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'];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user