mirror of
https://github.com/smarty-php/smarty.git
synced 2025-07-30 16:07:13 +02:00
Merge branch 'wxiaoguang-fix-escape-5.0'
This commit is contained in:
1
changelog/930.md
Normal file
1
changelog/930.md
Normal file
@ -0,0 +1 @@
|
||||
- Fix incorrect compilation of expressions when escape_html=true [#930](https://github.com/smarty-php/smarty/pull/930)
|
@ -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) . "')";
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user