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:
parent
271c539974
commit
927d097375
3 changed files with 34 additions and 33 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue