diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index f3c76695f..464dbd114 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -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 diff --git a/lib/WebGUI/Operation/Shared.pm b/lib/WebGUI/Operation/Shared.pm index f43e55cb5..371de386b 100644 --- a/lib/WebGUI/Operation/Shared.pm +++ b/lib/WebGUI/Operation/Shared.pm @@ -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); diff --git a/t/Macro/EditableToggle.t b/t/Macro/EditableToggle.t index 71d71e07a..525d945f3 100644 --- a/t/Macro/EditableToggle.t +++ b/t/Macro/EditableToggle.t @@ -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',