diff options
author | Mario <mario@mariovavti.com> | 2022-10-11 18:34:03 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-10-11 18:34:03 +0000 |
commit | 108a3efe0b6d37a7ed394a84c69b924ca727f17a (patch) | |
tree | ed9904767622d769fcee883d407310087ed7d57a /vendor/smarty/smarty/libs/plugins/modifiercompiler.unescape.php | |
parent | ccd826f63a7a4c7e442fab8a70d9c4c84808b417 (diff) | |
download | volse-hubzilla-108a3efe0b6d37a7ed394a84c69b924ca727f17a.tar.gz volse-hubzilla-108a3efe0b6d37a7ed394a84c69b924ca727f17a.tar.bz2 volse-hubzilla-108a3efe0b6d37a7ed394a84c69b924ca727f17a.zip |
update composer libs
Diffstat (limited to 'vendor/smarty/smarty/libs/plugins/modifiercompiler.unescape.php')
-rw-r--r-- | vendor/smarty/smarty/libs/plugins/modifiercompiler.unescape.php | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/vendor/smarty/smarty/libs/plugins/modifiercompiler.unescape.php b/vendor/smarty/smarty/libs/plugins/modifiercompiler.unescape.php index 05beb81f5..3438fe3e0 100644 --- a/vendor/smarty/smarty/libs/plugins/modifiercompiler.unescape.php +++ b/vendor/smarty/smarty/libs/plugins/modifiercompiler.unescape.php @@ -14,20 +14,28 @@ * @author Rodney Rehm * * @param array $params parameters + * @param Smarty_Internal_TemplateCompilerBase $compiler * * @return string with compiled code */ -function smarty_modifiercompiler_unescape($params) +function smarty_modifiercompiler_unescape($params, Smarty_Internal_TemplateCompilerBase $compiler) { - if (!isset($params[ 1 ])) { - $params[ 1 ] = 'html'; - } + $compiler->template->_checkPlugins( + array( + array( + 'function' => 'smarty_literal_compiler_param', + 'file' => SMARTY_PLUGINS_DIR . 'shared.literal_compiler_param.php' + ) + ) + ); + + $esc_type = smarty_literal_compiler_param($params, 1, 'html'); + if (!isset($params[ 2 ])) { $params[ 2 ] = '\'' . addslashes(Smarty::$_CHARSET) . '\''; - } else { - $params[ 2 ] = "'{$params[ 2 ]}'"; } - switch (trim($params[ 1 ], '"\'')) { + + switch ($esc_type) { case 'entity': case 'htmlall': if (Smarty::$_MBSTRING) { |