From 5aaaa57ce4790068f3092f3aa33d98b87a14e746 Mon Sep 17 00:00:00 2001 From: Jonathan Druart 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 Signed-off-by: Jonathan Druart --- 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('
'); }); } -- 2.39.5