Bugzilla – Attachment 115529 Details for
Bug 22070
OpacBrowseResults has broken link back to search results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22070: Try to fix encoding and escaping issue on browse result
Bug-22070-Try-to-fix-encoding-and-escaping-issue-o.patch (text/plain), 2.66 KB, created by
Jonathan Druart
on 2021-01-21 11:24:27 UTC
(
hide
)
Description:
Bug 22070: Try to fix encoding and escaping issue on browse result
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-01-21 11:24:27 UTC
Size:
2.66 KB
patch
obsolete
>From 501544afa71d8b339b122d6d33ae41675d0932a2 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 21 Jan 2021 12:20:03 +0100 >Subject: [PATCH] Bug 22070: Try to fix encoding and escaping issue on browse > result > >Pretty sure this does not work but in my tests it seems to fix the >problem. >Note that if there are several pages, the next link won't appear if you >are on the last result of the first page. > >I don't understand why this code is so complicated, couldn't we port >what we have on the staff interface (browser.js)? >--- > opac/opac-detail.pl | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) > >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index 8b935af155..e6d396786d 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -229,7 +229,6 @@ my $session = get_session($query->cookie("CGISESSID")); > my %paging = (previous => {}, next => {}); > if ($session->param('busc')) { > use C4::Search; >- use URI::Escape; > > # Rebuild the string to store on session > # param value is URI encoded and params separator is HTML encode (&) >@@ -243,14 +242,14 @@ if ($session->param('busc')) { > if ($_ =~ /^(?:query|listBiblios|newlistBiblios|query_type|simple_query|total|offset|offsetSearch|next|previous|count|expand|scan)/) { > if (defined($arrParamsBusc->{$_})) { > $pasarParams .= '&' if ($j); >- $pasarParams .= $_ . '=' . Encode::decode('UTF-8', uri_escape_utf8( $arrParamsBusc->{$_} )); >+ $pasarParams .= $_ . '=' . $arrParamsBusc->{$_}; > $j++; > } > } else { > for my $value (@{$arrParamsBusc->{$_}}) { > next if !defined($value); > $pasarParams .= '&' if ($j); >- $pasarParams .= $_ . '=' . Encode::decode('UTF-8', uri_escape_utf8($value)); >+ $pasarParams .= $_ . '=' . $value; > $j++; > } > } >@@ -314,12 +313,12 @@ if ($session->param('busc')) { > for (@arrBusc) { > ($key, $value) = split(/=/, $_, 2); > if ($key =~ /^(?:query|listBiblios|newlistBiblios|query_type|simple_query|next|previous|total|offset|offsetSearch|count|expand|scan)/) { >- $arrParamsBusc{$key} = uri_unescape($value); >+ $arrParamsBusc{$key} = $value; > } else { > unless (exists($arrParamsBusc{$key})) { > $arrParamsBusc{$key} = []; > } >- push @{$arrParamsBusc{$key}}, uri_unescape($value); >+ push @{$arrParamsBusc{$key}}, $value; > } > } > my $searchAgain = 0; >-- >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 22070
:
115529
|
136550