Bug 6554: Followup for preferences.pl
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thu, 28 Mar 2013 11:51:26 +0000 (12:51 +0100)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Mon, 1 Apr 2013 22:51:50 +0000 (18:51 -0400)
Decodes searchfield.

Test plan:
Look for e accent in preferences. You should no longer see converted chars.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works ok, no errors.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>

admin/preferences.pl

index e24657e..2182591 100755 (executable)
@@ -21,6 +21,7 @@ use strict;
 use warnings;
 
 use CGI;
+
 use C4::Auth;
 use C4::Context;
 use C4::Koha;
@@ -296,7 +297,8 @@ if ( $op eq 'save' ) {
 my @TABS;
 
 if ( $op eq 'search' ) {
-    my $searchfield = $input->param( 'searchfield' );
+    my $searchfield = $input->param('searchfield');
+    utf8::decode($searchfield);
 
     $searchfield =~ s/\p{IsC}//g;
     $searchfield =~ s/\s+/ /;