From 1820e875dcf852c57f923050ce802c76566fade5 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Fri, 26 Jan 2024 15:44:59 +0800 Subject: [PATCH] fix escape --- src/Compile/PrintExpressionCompiler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Compile/PrintExpressionCompiler.php b/src/Compile/PrintExpressionCompiler.php index 99a03901..486512d4 100644 --- a/src/Compile/PrintExpressionCompiler.php +++ b/src/Compile/PrintExpressionCompiler.php @@ -84,7 +84,7 @@ class PrintExpressionCompiler extends Base { } if ($compiler->getTemplate()->getSmarty()->escape_html) { - $output = "htmlspecialchars((string) {$output}, ENT_QUOTES, '" . addslashes(\Smarty\Smarty::$_CHARSET) . "')"; + $output = "htmlspecialchars((string) ({$output}), ENT_QUOTES, '" . addslashes(\Smarty\Smarty::$_CHARSET) . "')"; } }