Bugzilla – Attachment 103892 Details for
Bug 25308
When cataloguing search fields are prefilled from record, content after & is cut off
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25308: Escape querystring for Z39.50 popup from cataloging
Bug-25308-Escape-querystring-for-Z3950-popup-from-.patch (text/plain), 2.23 KB, created by
Phil Ringnalda
on 2020-04-29 00:31:40 UTC
(
hide
)
Description:
Bug 25308: Escape querystring for Z39.50 popup from cataloging
Filename:
MIME Type:
Creator:
Phil Ringnalda
Created:
2020-04-29 00:31:40 UTC
Size:
2.23 KB
patch
obsolete
>From 27cd4341e874d42c91ffee99df06081b0f345a2a Mon Sep 17 00:00:00 2001 >From: Phil Ringnalda <phil@chetcolibrary.org> >Date: Tue, 28 Apr 2020 17:16:51 -0700 >Subject: [PATCH] Bug 25308: Escape querystring for Z39.50 popup from > cataloging > >Test plan: > >1. For bonus fun, Administration -> MARC Frameworks -> New framework, >with the code A&B and description Ants & Bees >2. In the A&B Actions menu, choose MARC structure since Import won't >work >3. Accept the offer to copy in structure from default >4. Cataloging -> New record -> Ants & Bees >5. Type This & That in the 245$a (and for extra credit, in 020$a, and >create an author authority with an & in it so you can put it in the >100/110) >6. Click Z39.50/SRU search, make sure everything you typed is prefilled >including the parts after & >7. Search for anything that will retrieve a record (the ISBN This & >That probably won't), choose Import >8. Check that the record came back, and verify in the Settings menu that >it's still in the Ants & Bees framework. >--- > .../intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >index 4fda2747a9..a174c70283 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt >@@ -449,7 +449,7 @@ > */ > function GetZ3950Terms(){ > var frameworkcode = document.getElementById("frameworkcode").value; >- var strQuery = "&frameworkcode=" + frameworkcode; >+ var strQuery = "&frameworkcode=" + encodeURIComponent(frameworkcode); > var mandatories = new Array(); > var mandatories_label = new Array(); > [% FOREACH BIG_LOO IN BIG_LOOP %] >@@ -466,7 +466,7 @@ > for(var i=0,len=mandatories.length; i<len ; i++){ > var field_value = document.getElementById(mandatories[i]).value; > if( field_value ){ >- strQuery += "&"+mandatories_label[i]+"="+field_value; >+ strQuery += "&"+encodeURIComponent(mandatories_label[i])+"="+encodeURIComponent(field_value); > } > } > return strQuery; >-- >2.26.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 25308
:
103892
|
104240
|
104925