From 6a78d2ba8e7d76549c7dc93178345e10cc0fc2af Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 8 May 2014 16:36:10 +0000 Subject: [PATCH] Bug 4068: (follow-up) use URI::Escape This allows for suggestions that contain characters such as the ampersand to have their status changed. Signed-off-by: Galen Charlton (cherry picked from commit fb8d47bedac13944d8efd6eec8286c3eff574782) Signed-off-by: Fridolin Somers --- suggestion/suggestion.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl index 3c9fea69fc..5e59dbcbdc 100755 --- a/suggestion/suggestion.pl +++ b/suggestion/suggestion.pl @@ -31,6 +31,7 @@ use C4::Search; use C4::Dates qw(format_date); use C4::Members; use C4::Debug; +use URI::Escape; sub Init{ my $suggestion= shift @_; @@ -173,7 +174,7 @@ elsif ($op eq "change" ) { $$suggestion_ref{'suggestionid'}=$suggestionid; &ModSuggestion($suggestion_ref); } - my $params; + my $params = ''; foreach my $key ( qw( displayby branchcode title author isbn publishercode copyrightdate @@ -183,8 +184,8 @@ elsif ($op eq "change" ) { ) ) { - $params .= $key . '=' . $input->param($key) . '&' - if $input->param($key); + $params .= $key . '=' . uri_escape($input->param($key)) . '&' + if defined($input->param($key)); } print $input->redirect("/cgi-bin/koha/suggestion/suggestion.pl?$params"); }elsif ($op eq "delete" ) { -- 2.39.5