From 3b4943177f3e711b64910e7f63b8a39bf98dc4b9 Mon Sep 17 00:00:00 2001 From: Drake Date: Fri, 1 Dec 2006 19:17:37 +0000 Subject: [PATCH] Fix problem with profile field possibleValues with apostrophes in i18n substitutions not working. --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Operation/Shared.pm | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 230c7a43a..1d856cd88 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -26,6 +26,7 @@ post containing the login credentials is sent over https. After authentication the user is redirected to http. (Martin Kamerbeek / Procolix) - fix: RSS From Parent assets should always be hidden from navigation + - fix: profile field i18ned possibleValues with apostrophes failing 7.2.3 - fix: minor bug with new template vars in Auth::createAccount diff --git a/lib/WebGUI/Operation/Shared.pm b/lib/WebGUI/Operation/Shared.pm index 371de386b..e761c67a8 100644 --- a/lib/WebGUI/Operation/Shared.pm +++ b/lib/WebGUI/Operation/Shared.pm @@ -109,8 +109,9 @@ sub secureEval { my @param = split (/,\s*/,$2); @param = map { s/^['"]|['"]$//g; $_; } @param; my $output = $trusted{$function}(@param); - return $output if (ref $output); - $code =~ s/\Q$cmd/'$output'/g; + return $output if (ref $output); + $output =~ s/\'/\\\'/g; + $code =~ s/\Q$cmd/\'$output\'/g; } }