From db887adc37515c62bc982dac10a47a7ed5489ee1 Mon Sep 17 00:00:00 2001 From: "Uwe.Tews" Date: Tue, 12 Jan 2010 20:37:05 +0000 Subject: [PATCH] - bugfix the {function..} tag did not accept the name attribute in double quotes --- change_log.txt | 1 + libs/sysplugins/smarty_internal_compile_function.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/change_log.txt b/change_log.txt index 6e1aa4d9..5a5c0f7a 100644 --- a/change_log.txt +++ b/change_log.txt @@ -2,6 +2,7 @@ - changed back modifer handling in parser. Some restrictions still apply: if modifiers are used in side {if...} expression or in mathematical expressions parentheses must be used. +- bugfix the {function..} tag did not accept the name attribute in double quotes ###beta 6#### diff --git a/libs/sysplugins/smarty_internal_compile_function.php b/libs/sysplugins/smarty_internal_compile_function.php index 10735bf8..23fc27d6 100644 --- a/libs/sysplugins/smarty_internal_compile_function.php +++ b/libs/sysplugins/smarty_internal_compile_function.php @@ -29,7 +29,7 @@ class Smarty_Internal_Compile_Function extends Smarty_Internal_CompileBase { $save = array($_attr, $compiler->template->extracted_compiled_code, $compiler->template->extract_code, $compiler->template->has_nocache_code, $compiler->template->required_plugins); $this->_open_tag('function', $save); - $_name = trim($_attr['name'], "'"); + $_name = trim($_attr['name'], "'\""); unset($_attr['name']); foreach ($_attr as $_key => $_data) { $compiler->template->properties['function'][$_name]['parameter'][$_key] = $_data;