diff --git a/src/Template/Template.php b/src/Template/Template.php index db11a9f..e43c2d9 100644 --- a/src/Template/Template.php +++ b/src/Template/Template.php @@ -360,6 +360,10 @@ public function escape($string, $functions = null) { static $flags; + if ($this->engine->doesFunctionExist('escape')) { + return $this->engine->getFunction('escape')->call($this, func_get_args()); + } + if (!isset($flags)) { $flags = ENT_QUOTES | (defined('ENT_SUBSTITUTE') ? ENT_SUBSTITUTE : 0); }