If you have a Corporate Name authority record with 100$a containing Arthur Andersen & Co. and you click the Replace record via Z39.50/SRU search button, the Author (corporate) search field in the popup window is filled with "Arthur Andersen " because the unescaped & is treated as the start of the next query param.
Created attachment 119768 [details] [review] 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
Created attachment 119949 [details] [review] 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 Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 120713 [details] [review] 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 Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Pushed to master for 21.05, thanks to everybody involved!
Pushed to 20.11.x for 20.11.06
Pushed to 20.05.x for 20.05.12
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.