From 402f970b77f6ef64e97fa3195bc64d73bab593ed Mon Sep 17 00:00:00 2001 From: hfhchan Date: Thu, 28 Jul 2016 18:06:50 +0800 Subject: [PATCH] Don't re-escape variables that are already safe --- src/Handlebars/Template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Handlebars/Template.php b/src/Handlebars/Template.php index 20ef957..3b631aa 100644 --- a/src/Handlebars/Template.php +++ b/src/Handlebars/Template.php @@ -629,7 +629,7 @@ class Template if (is_array($value)) { return 'Array'; } - if ($escaped) { + if ($escaped && !($value instanceof SafeString) { $args = $this->handlebars->getEscapeArgs(); array_unshift($args, (string)$value); $value = call_user_func_array(