Bug 26605: Correctly URI-encode query string in call number browse plugin
authorPhil Ringnalda <phil@chetcolibrary.org>
Fri, 2 Oct 2020 21:52:57 +0000 (14:52 -0700)
committerLucas Gass <lucas@bywatersolutions.com>
Mon, 16 Nov 2020 18:43:41 +0000 (18:43 +0000)
commit7ac243c96fef9fcf728d647f1e9d301506ccf08a
tree9f9cea9f3be61cb33a772070ce6742cffac30b59
parent940fdc447a0312a10903a7ae49e1a4b7d88c4521
Bug 26605: Correctly URI-encode query string in call number browse plugin

If you search for a call number like "M KRUEGER CO #11" in the
cn_browser.pl plugin, your query is cut off at "M KRUEGER CO " because
the hash isn't escaped, so the browser thinks you are opening a
window and trying to navigate to the element with the id 11 rather
than passing the #11 to the server.

To test:
1) Find the record you will use to test, determing the MARC
framework it uses by going to Edit > Edit record > Settings
2) In Administration > MARC bibliographic framework, click MARC
structure in the Actions menu for that framework
3) Navigate to the 952 tag, in the Actions menu click Edit subfields
4) In the tab for o, choose the Plugin cn_browser.pl and click
Save Changes
5) Click the Edit button next to one of the items on your record
6) In the Full call number field, add " CO #11" to the call number
7) Click the ... next to the field to open the Tag editor
8) In the popup window, verify that the search field includes the
" CO #11" you added to the call number

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c52a9e4cf362949192d3d58adab287cd82effbf1)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
cataloguing/value_builder/cn_browser.pl