Bugzilla – Attachment 119768 Details for
Bug 28159
URI-encode existing values put into query string for z39.50 authority search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28159: URI-encode existing values put into query string for z39.50 authority search
Bug-28159-URI-encode-existing-values-put-into-quer.patch (text/plain), 1.59 KB, created by
Phil Ringnalda
on 2021-04-16 17:06:10 UTC
(
hide
)
Description:
Bug 28159: URI-encode existing values put into query string for z39.50 authority search
Filename:
MIME Type:
Creator:
Phil Ringnalda
Created:
2021-04-16 17:06:10 UTC
Size:
1.59 KB
patch
obsolete
>From fa88a3aca0af41fcc940857b6451621b352596a9 Mon Sep 17 00:00:00 2001 >From: Phil Ringnalda <phil@chetcolibrary.org> >Date: Fri, 16 Apr 2021 09:55:25 -0700 >Subject: [PATCH] Bug 28159: URI-encode existing values put into query string > for z39.50 authority search > >When you trigger a z39.50 search from an existing authority record, Koha >prefills the search form with the value in the record. But because that >value passes through a URL, if it isn't URI-encoded characters like & or ; >will cut off the value. > >Test plan: >1) Authorities - New authority - Corporate Name >2) Tab 1, click "HEADING-CORPORATE NAME" to expand subfields >3) Subfield a, type foo & bar ; baz >4) Click Z39.50/SRU search >5) Ensure the whole string appears in the Author (corporate) field in > the popup >--- > .../intranet-tmpl/prog/en/modules/authorities/authorities.tt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >index 8435ae756e..c6090f8f62 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt >@@ -53,7 +53,7 @@ function GetZ3950Terms(){ > 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 += "&"+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 28159
:
119768
|
119949
|
120713