Skip to content

Commit

Permalink
Debug 'force' option of escape modifier.
Browse files Browse the repository at this point in the history
  • Loading branch information
Amaury committed Jun 18, 2024
1 parent a92a99b commit 70d2e8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Compile/Modifier/EscapeModifierCompiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function compile($params, \Smarty\Compiler\Template $compiler) {
// in case of auto-escaping, and without the 'force' option, no double-escaping
if ($compiler->getSmarty()->escape_html && $esc_type != 'force')
return $params[0];
$compiler->getSmarty()->raw_output = true;
// otherwise, escape the variable
return 'htmlspecialchars((string)' . $params[ 0 ] . ', ENT_QUOTES, ' . var_export($char_set, true) . ', ' .
var_export($double_encode, true) . ')';
// no break
Expand Down

0 comments on commit 70d2e8a

Please sign in to comment.