From cbc42056690e477373ab3005a304640ba5b0ce59 Mon Sep 17 00:00:00 2001 From: "Uwe.Tews" Date: Mon, 9 Aug 2010 14:28:28 +0000 Subject: [PATCH] - bugfix on modifier with doublequoted strings as parameter containing embedded tags --- change_log.txt | 3 +++ libs/sysplugins/smarty_internal_compile_private_modifier.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/change_log.txt b/change_log.txt index 913a3f1c..36f6256b 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,3 +1,6 @@ +09/08/2010 +- bugfix on modifier with doublequoted strings as parameter containing embedded tags + 06/08/2010 - bugfix when cascading some modifier like |strip|strip_tags modifier diff --git a/libs/sysplugins/smarty_internal_compile_private_modifier.php b/libs/sysplugins/smarty_internal_compile_private_modifier.php index 802ab167..d96f16fe 100644 --- a/libs/sysplugins/smarty_internal_compile_private_modifier.php +++ b/libs/sysplugins/smarty_internal_compile_private_modifier.php @@ -29,7 +29,7 @@ class Smarty_Internal_Compile_Private_Modifier extends Smarty_Internal_CompileBa $output = $_attr['value']; // loop over list of modifiers foreach ($_attr['modifierlist'] as $single_modifier) { - preg_match_all('/(\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\'|"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"|::?|[^:]+)/', $single_modifier, $mod_array); + preg_match_all('/(((\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\'|"[^"\\\\]*(?:\\\\.[^"\\\\]*)*")[^:]*)+|::?|[^:]+)/', $single_modifier, $mod_array); $modifier = $mod_array[0][0]; for ($i = 0, $count = count($mod_array[0]);$i < $count;$i++) { if ($mod_array[0][$i] == ':') {