[Koha-bugs] [Bug 31565] Patron search filter by category code with special character returns no results
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Sep 14 17:31:47 CEST 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31565
Lari Taskula <lari.taskula at hypernova.fi> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|Needs Signoff |In Discussion
--- Comment #4 from Lari Taskula <lari.taskula at hypernova.fi> ---
I also noticed what seems to be a bit confusing behavior to me when I query
cities endpoint with a "\" character as follows:
(My database holds a city named "TEST \")
1. LIKE, double escape \\\\
http://myinstance/api/v1/cities?=&_page=1&_per_page=20&q=[{"me.name":{"like":"%TEST
\\\\%"}}]&_match=contains&_order_by=+me.city_id
Result: found
2. Exact, double escape \\\\
http://myinstance/api/v1/cities?_page=1&_per_page=20&q=[{"me.name":"TEST
\\\\"}]&_match=contains&_order_by=+me.city_id
Result: not found, although same syntax as above?
3. Exact, single escape \\
http://myinstance/api/v1/cities?_page=1&_per_page=20&q=[{"me.name":"TEST
\\"}]&_match=contains&_order_by=+me.city_id
Result: found
Should we also do the "\" escaping only for LIKE searches like _ and %? If yes
then the current patch must be adjusted, as it escapes \ for both types of
searches.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list