Bugzilla – Attachment 127593 Details for
Bug 29463
Umlauts in search field get changed into replacement character
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29463: Escape utf8 characters before appending search query to url
Bug-29463-Escape-utf8-characters-before-appending-.patch (text/plain), 1.53 KB, created by
Joonas Kylmälä
on 2021-11-12 17:49:09 UTC
(
hide
)
Description:
Bug 29463: Escape utf8 characters before appending search query to url
Filename:
MIME Type:
Creator:
Joonas Kylmälä
Created:
2021-11-12 17:49:09 UTC
Size:
1.53 KB
patch
obsolete
>From 946e2f7cdfc4cccd7098af12cae19c68b9e69024 Mon Sep 17 00:00:00 2001 >From: Petro Vashchuk <stalkernoid@gmail.com> >Date: Fri, 12 Nov 2021 15:14:46 +0200 >Subject: [PATCH] Bug 29463: Escape utf8 characters before appending search > query to url >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >To test: >1) go to the main page of Koha and search in the "Check out" search window type "näyttö". >2) see that umlauts got replaced with replacement characters. >3) apply the patch. >4) repeat 1-2, ensure that umlauts displayed correctly and are not getting replaced with replacement characters. > >JK: remove period from commit title >Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi> >--- > circ/circulation.pl | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/circ/circulation.pl b/circ/circulation.pl >index 261f26dd57..89ccf2a765 100755 >--- a/circ/circulation.pl >+++ b/circ/circulation.pl >@@ -26,6 +26,7 @@ > > use Modern::Perl; > use CGI qw ( -utf8 ); >+use URI::Escape qw( uri_escape_utf8 ); > use DateTime; > use DateTime::Duration; > use Scalar::Util qw( looks_like_number ); >@@ -227,7 +228,7 @@ if ($findborrower) { > if ( $patron ) { > $borrowernumber = $patron->borrowernumber; > } else { >- print $query->redirect( "/cgi-bin/koha/members/member.pl?quicksearch=1&circsearch=1&searchmember=" . $findborrower ); >+ print $query->redirect( "/cgi-bin/koha/members/member.pl?quicksearch=1&circsearch=1&searchmember=" . uri_escape_utf8($findborrower) ); > exit; > } > } >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 29463
:
127583
|
127593
|
127846