Bugzilla – Attachment 124330 Details for
Bug 20529
Return to results link is truncated when the search contains a double quote
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20529: Remove other occurrences of decodeURIComponent from browser.js
Bug-20529-Remove-other-occurrences-of-decodeURICom.patch (text/plain), 3.81 KB, created by
Nick Clemens
on 2021-09-01 13:01:52 UTC
(
hide
)
Description:
Bug 20529: Remove other occurrences of decodeURIComponent from browser.js
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2021-09-01 13:01:52 UTC
Size:
3.81 KB
patch
obsolete
>From cd578d9678ab8e8370996ebd94ea9fa6e7888627 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 9 Jul 2021 16:01:43 +0200 >Subject: [PATCH] Bug 20529: Remove other occurrences of decodeURIComponent > from browser.js > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > koha-tmpl/intranet-tmpl/prog/js/browser.js | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/browser.js b/koha-tmpl/intranet-tmpl/prog/js/browser.js >index 09a4da26d7..d5aae8b4e5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/browser.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/browser.js >@@ -32,9 +32,9 @@ KOHA.browser = function (searchid, biblionumber) { > var browseRecords = function (movement) { > var newSearchPos = me.curPos + movement; > if (newSearchPos > current_search.results.length - 1) { >- window.location = '/cgi-bin/koha/catalogue/search.pl?' + decodeURIComponent(current_search.query) + '&limit=' + decodeURIComponent(current_search.limit) + '&sort_by=' + current_search.sort + '&gotoPage=detail.pl&gotoNumber=first&searchid=' + me.searchid + '&offset=' + newSearchPos; >+ window.location = '/cgi-bin/koha/catalogue/search.pl?' + current_search.query + '&limit=' + current_search.limit + '&sort_by=' + current_search.sort + '&gotoPage=detail.pl&gotoNumber=first&searchid=' + me.searchid + '&offset=' + newSearchPos; > } else if (newSearchPos < 0) { >- window.location = '/cgi-bin/koha/catalogue/search.pl?' + decodeURIComponent(current_search.query) + '&limit=' + decodeURIComponent(current_search.limit) + '&sort_by=' + current_search.sort + '&gotoPage=detail.pl&gotoNumber=last&searchid=' + me.searchid + '&offset=' + (me.offset - current_search.pagelen); >+ window.location = '/cgi-bin/koha/catalogue/search.pl?' + current_search.query + '&limit=' + current_search.limit + '&sort_by=' + current_search.sort + '&gotoPage=detail.pl&gotoNumber=last&searchid=' + me.searchid + '&offset=' + (me.offset - current_search.pagelen); > } else { > window.location = window.location.href.replace('biblionumber=' + biblionumber, 'biblionumber=' + current_search.results[newSearchPos]); > } >@@ -81,7 +81,7 @@ KOHA.browser = function (searchid, biblionumber) { > > $(document).ready(function () { > if (me.curPos > -1) { >- var searchURL = '/cgi-bin/koha/catalogue/search.pl?' + current_search.query + '&limit=' + decodeURIComponent(current_search.limit) + '&sort_by=' + current_search.sort + '&searchid=' + me.searchid + '&offset=' + me.offset; >+ var searchURL = '/cgi-bin/koha/catalogue/search.pl?' + current_search.query + '&limit=' + current_search.limit + '&sort_by=' + current_search.sort + '&searchid=' + me.searchid + '&offset=' + me.offset; > var prevbutton; > var nextbutton; > if (me.curPos === 0 && parseInt(current_search.offset) === 1) { >@@ -116,7 +116,7 @@ KOHA.browser = function (searchid, biblionumber) { > me.show_back_link = function () { > if (current_search) { > $(document).ready(function () { >- var searchURL = '/cgi-bin/koha/catalogue/search.pl?' + decodeURIComponent(current_search.query) + '&limit=' + decodeURIComponent(current_search.limit) + '&sort_by=' + current_search.sort + '&searchid=' + me.searchid; >+ var searchURL = '/cgi-bin/koha/catalogue/search.pl?' + current_search.query + '&limit=' + current_search.limit + '&sort_by=' + current_search.sort + '&searchid=' + me.searchid; > $('#previous_search_link').replaceWith('<div><div class="browse-label"><a href="' + searchURL + '"><i class="fa fa-list"></i> ' + __("Go back to the results") + '</a></div></div>'); > }); > } >-- >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 20529
:
74251
|
74553
|
74554
|
74610
|
120816
|
122626
|
122736
|
122751
|
124329
| 124330