Index: openacs-4/packages/acs-templating/tcl/parse-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/parse-procs.tcl,v diff -u -r1.37 -r1.38 --- openacs-4/packages/acs-templating/tcl/parse-procs.tcl 24 Feb 2005 13:33:02 -0000 1.37 +++ openacs-4/packages/acs-templating/tcl/parse-procs.tcl 21 Nov 2005 17:32:48 -0000 1.38 @@ -449,15 +449,16 @@ # array variables # TODO: ad_quotehtml # TODO: lang::util::localize - regsub {^%([a-zA-Z0-9_]+)\.([a-zA-Z0-9_]+)%$} $substitution {$\1(\2)} substitution - # ordinary variables - regsub {^%([a-zA-Z0-9_:]+)%$} $substitution {$\1} substitution - - # Create command to execute in caller's scope - set command "subst -nocommands \"$substitution\"" - - # and execute that - set substitution [uplevel $command] + regsub -all {[\]\[\{\}\"]\\$} $substitution {\\&} substitution + if { [regexp {^%([a-zA-Z0-9_]+)\.([a-zA-Z0-9_]+)%$} $substitution match arr key] } { + # the array key name is substitured by the tcl parser s + regsub -all {[\]\[\{\}\"]\\$} $key {\\&} key + set substitution [uplevel $command] + } + if { [regexp {^%([a-zA-Z0-9_:]+)%$} $substitution match var] } { + set command "set $var" + set substitution [uplevel $command] + } } append formatted_message $substitution @@ -466,6 +467,15 @@ append formatted_message $remaining_message return $formatted_message + + +# + + + + + + } ad_proc -public template::adp_compile { source_type source } {