Summary: | Punctuation in site names breaks Edit/Delete z39.50 server administration | ||
---|---|---|---|
Product: | Koha | Reporter: | Chris Cormack <chris> |
Component: | Z39.50 / SRU / OpenSearch Servers | Assignee: | Isaac Brodsky <isaacbrodsky> |
Status: | CLOSED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | normal | ||
Priority: | P2 | CC: | fridolin.somers, gmcharlt, isaacbrodsky, m.de.rooy |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Patch to correct query escaping on Z39.50 server list
[SIGNED-OFF] Bug 1047 - Punctuation in site names breaks Edit/Delete z39.50 server administration Bug 1047 - Punctuation in site names breaks Edit/Delete z39.50 server administration |
Description
Chris Cormack
2010-05-20 23:38:15 UTC
Reopening: I'm experiencing this issue with Koha 3.08 on Debian. I entered a Z39.50 server name containing an ampersand and system administration does not seem to be able to handle it. (Edit & delete break as described, searching on server seems to work fine.) This bug affects master as of 3.12 beta1 I tested this with the example "UNIVERSITY OF BC, LAW LIB" in current master (3.15) and it works nicely. Deleting and editing is no problem. It doesn't work if you use an & The problem exists because the name of the Z39.50 server is not escaped in the query string to bring up the edit/delete pages. This appears to be a bug with the "|url" Template filter, but I cannot find where that is defined. Replacing |url with |uri fixes this issue. I will submit a patch shortly. Created attachment 25702 [details] [review] Patch to correct query escaping on Z39.50 server list Created attachment 25706 [details] [review] [SIGNED-OFF] Bug 1047 - Punctuation in site names breaks Edit/Delete z39.50 server administration The template used to show the Z39.50 server administration page had a bug that caused it to not correctly escape generated query strings. Because the Z39.50 server name is used to lookup the server in order to edit or delete it, when the server name is not passed correctly in the query string, it is impossible to bring up the edit or delete forms (without manually entering the escaped string.) This patch corrects which template is filter used to escape those query strings. To test: (1) Login to intranet, go to Administration -> Z39.50 servers (2) Select "New Z3.50 Server". Enter a server name that contains an ampersand (&) e.g.: "FOO & BAR". Enter other details and submit. Click OK to confirmation message. (3) In the server list, click on the server name, the "Edit" or "Delete" buttons for the server. The correct and full server details should be brought up. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 26174 [details] [review] Bug 1047 - Punctuation in site names breaks Edit/Delete z39.50 server administration The template used to show the Z39.50 server administration page had a bug that caused it to not correctly escape generated query strings. Because the Z39.50 server name is used to lookup the server in order to edit or delete it, when the server name is not passed correctly in the query string, it is impossible to bring up the edit or delete forms (without manually entering the escaped string.) This patch corrects which template is filter used to escape those query strings. To test: (1) Login to intranet, go to Administration -> Z39.50 servers (2) Select "New Z3.50 Server". Enter a server name that contains an ampersand (&) e.g.: "FOO & BAR". Enter other details and submit. Click OK to confirmation message. (3) In the server list, click on the server name, the "Edit" or "Delete" buttons for the server. The correct and full server details should be brought up. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Pushed to master. This appears to be your first patch accepted into Koha master. Congratulations, Isaac! Pushed to 3.14.x, will be in 3.14.08 Look here for the different between uri and url in TT : http://template-toolkit.org/docs/manual/Filters.html#section_uri |