Don't re-escape variables that are already safe

This commit is contained in:
hfhchan 2016-07-28 18:06:50 +08:00 committed by GitHub
parent a00af06cac
commit 402f970b77

View File

@ -629,7 +629,7 @@ class Template
if (is_array($value)) { if (is_array($value)) {
return 'Array'; return 'Array';
} }
if ($escaped) { if ($escaped && !($value instanceof SafeString) {
$args = $this->handlebars->getEscapeArgs(); $args = $this->handlebars->getEscapeArgs();
array_unshift($args, (string)$value); array_unshift($args, (string)$value);
$value = call_user_func_array( $value = call_user_func_array(