Fix a parsing bug in WebGUI::Operation::Shared where it would puke if

the code it was parsing had spaces after the commas.
Formatting code in EditableToggle.t
This commit is contained in:
Colin Kuskie 2006-07-26 01:23:30 +00:00
parent 271c539974
commit 927d097375
3 changed files with 34 additions and 33 deletions

View file

@ -106,7 +106,7 @@ sub secureEval {
foreach my $function (keys %trusted ) {
while ($code =~ /($function\(([^)]*)\)\s*;*)/g) {
my $cmd = $1;
my @param = split (/,/,$2);
my @param = split (/,\s*/,$2);
@param = map { s/^['"]|['"]$//g; $_; } @param;
my $output = $trusted{$function}(@param);
return $output if (ref $output);