aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/smarty/smarty/libs/plugins/modifiercompiler.unescape.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-10-11 19:20:46 +0000
committerMario <mario@mariovavti.com>2022-10-11 19:20:46 +0000
commit4070c46d157918a01e2a34820985a64fee4e99f0 (patch)
tree2ee04c8a086bb4e2a7c43a2fa2b947e73edffa38 /vendor/smarty/smarty/libs/plugins/modifiercompiler.unescape.php
parenta749db8d0f216491cfefb3849891d93f89b775f7 (diff)
downloadvolse-hubzilla-4070c46d157918a01e2a34820985a64fee4e99f0.tar.gz
volse-hubzilla-4070c46d157918a01e2a34820985a64fee4e99f0.tar.bz2
volse-hubzilla-4070c46d157918a01e2a34820985a64fee4e99f0.zip
composer update smarty
Diffstat (limited to 'vendor/smarty/smarty/libs/plugins/modifiercompiler.unescape.php')
-rw-r--r--vendor/smarty/smarty/libs/plugins/modifiercompiler.unescape.php22
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) {