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
|
|
@ -55,6 +55,7 @@
|
|||
- fix: Search Feature Select Box Not Working
|
||||
- Added "Save and Commit" option for environments where the appearance of
|
||||
workflow is unwanted.
|
||||
- fix: WebGUI::International::get can't handle spaces
|
||||
|
||||
|
||||
7.0.2
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -34,48 +34,48 @@ my $i18n = WebGUI::International->new($session,'Macro_EditableToggle');
|
|||
|
||||
my @testSets = (
|
||||
{
|
||||
comment => 'Visitor sees nothing, admin off, home asset',
|
||||
userId => 1,
|
||||
comment => 'Visitor sees nothing, admin off, home asset',
|
||||
userId => 1,
|
||||
adminStatus => 'off',
|
||||
asset => $homeAsset,
|
||||
macroText => q!^EditableToggle();!,
|
||||
onText => $i18n->get(516),
|
||||
offText => $i18n->get(517),
|
||||
template => q!!,
|
||||
output => '',
|
||||
asset => $homeAsset,
|
||||
macroText => q!^EditableToggle();!,
|
||||
onText => $i18n->get(516),
|
||||
offText => $i18n->get(517),
|
||||
template => q!!,
|
||||
output => '',
|
||||
},
|
||||
{
|
||||
comment => 'Visitor sees nothing, admin on, home asset',
|
||||
userId => 1,
|
||||
comment => 'Visitor sees nothing, admin on, home asset',
|
||||
userId => 1,
|
||||
adminStatus => 'on',
|
||||
asset => $homeAsset,
|
||||
macroText => q!^EditableToggle();!,
|
||||
onText => $i18n->get(516),
|
||||
offText => $i18n->get(517),
|
||||
template => q!!,
|
||||
output => '',
|
||||
asset => $homeAsset,
|
||||
macroText => q!^EditableToggle();!,
|
||||
onText => $i18n->get(516),
|
||||
offText => $i18n->get(517),
|
||||
template => q!!,
|
||||
output => '',
|
||||
},
|
||||
{
|
||||
comment => 'Admin sees off text, home asset',
|
||||
userId => 3,
|
||||
comment => 'Admin sees off text, home asset',
|
||||
userId => 3,
|
||||
adminStatus => 'off',
|
||||
asset => $homeAsset,
|
||||
macroText => q!^EditableToggle();!,
|
||||
onText => $i18n->get(516),
|
||||
offText => $i18n->get(517),
|
||||
template => q!!,
|
||||
output => \&simpleHTMLParser,
|
||||
asset => $homeAsset,
|
||||
macroText => q!^EditableToggle();!,
|
||||
onText => $i18n->get(516),
|
||||
offText => $i18n->get(517),
|
||||
template => q!!,
|
||||
output => \&simpleHTMLParser,
|
||||
},
|
||||
{
|
||||
comment => 'Admin sees on text, home asset',
|
||||
userId => 3,
|
||||
comment => 'Admin sees on text, home asset',
|
||||
userId => 3,
|
||||
adminStatus => 'on',
|
||||
asset => $homeAsset,
|
||||
macroText => q!^EditableToggle();!,
|
||||
onText => $i18n->get(516),
|
||||
offText => $i18n->get(517),
|
||||
template => q!!,
|
||||
output => \&simpleHTMLParser,
|
||||
asset => $homeAsset,
|
||||
macroText => q!^EditableToggle();!,
|
||||
onText => $i18n->get(516),
|
||||
offText => $i18n->get(517),
|
||||
template => q!!,
|
||||
output => \&simpleHTMLParser,
|
||||
},
|
||||
{
|
||||
comment => 'Admin sees off text, custom asset',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue