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 <gmc@esilibrary.com>
(cherry picked from commit fb8d47beda)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 6a78d2ba8e)
This commit is contained in:
Galen Charlton 2014-05-08 16:36:10 +00:00 committed by Koha instance rel312x-koha
parent e56e87913e
commit 850df48328
1 changed files with 4 additions and 3 deletions

View File

@ -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 @_;
@ -170,7 +171,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
@ -180,8 +181,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" ) {