Bugzilla – Attachment 74610 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: Fix "Return to results" link broken by a double quote
Bug-20529-Fix-Return-to-results-link-broken-by-a-d.patch (text/plain), 2.46 KB, created by
Nick Clemens
on 2018-04-20 10:38:55 UTC
(
hide
)
Description:
Bug 20529: Fix "Return to results" link broken by a double quote
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2018-04-20 10:38:55 UTC
Size:
2.46 KB
patch
obsolete
>From 7615514d80999061d713aa5fff714a73d688ad7b Mon Sep 17 00:00:00 2001 >From: Victor Grousset <victor.grousset@biblibre.com> >Date: Mon, 16 Apr 2018 18:55:48 +0200 >Subject: [PATCH] Bug 20529: Fix "Return to results" link broken by a double > quote >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >(in the search query) > >cause: decodeURIComponent used when URI encoding was necessary. (At >least in main usecase of this feature) >It could have been a copy and paste error. From the above >browseRecords() function. > >== Test plan == >1. Search in the staff catalogue «a "alice"» > Replace a and alice with whatever than will return a result for you >2. Click on the first result >3. Check the "Return to results" link > It should be like > staff_url://cgi-bin/koha/catalogue/search.pl?idx=kw&q=a > This is the bug. Because when clicking the link, your search will be > 'kw,wrdl: a' > instead of > 'kw,wrdl: a "alice"' >4. Apply this patch. >5. Search in the staff catalogue «a "alice"» > Replace a and alice with whatever than will return a result for you >6. Click on the first result >7. Check the "Return to results" link > The link should preserve the full query > >Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> >Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > koha-tmpl/intranet-tmpl/js/browser.js | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/js/browser.js b/koha-tmpl/intranet-tmpl/js/browser.js >index 7e40785..5d7a796 100644 >--- a/koha-tmpl/intranet-tmpl/js/browser.js >+++ b/koha-tmpl/intranet-tmpl/js/browser.js >@@ -89,7 +89,7 @@ KOHA.browser = function (searchid, biblionumber) { > > $(document).ready(function () { > if (me.curPos > -1) { >- var searchURL = '/cgi-bin/koha/catalogue/search.pl?' + decodeURIComponent(current_search.query) + '&limit=' + decodeURIComponent(current_search.limit) + '&sort=' + current_search.sort + '&searchid=' + me.searchid + '&offset=' + me.offset; >+ var searchURL = '/cgi-bin/koha/catalogue/search.pl?' + current_search.query + '&limit=' + decodeURIComponent(current_search.limit) + '&sort=' + current_search.sort + '&searchid=' + me.searchid + '&offset=' + me.offset; > var prevbutton; > var nextbutton; > if (me.curPos === 0 && current_search.offset === 1) { >-- >2.1.4
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