]> git.koha-community.org Git - koha.git/commit
Bug 30393: Make datatables wrapper handle searching for %, _, \
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 30 Mar 2022 10:10:26 +0000 (12:10 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 4 Apr 2022 07:46:57 +0000 (09:46 +0200)
commit3c550c62ae4341a3846169d2c96ee9fd4f549459
tree50ffc04daeac9d794818492fcb6299191bd6ebfa
parent68b56685c74779a2859e13cbccf340c892544d2d
Bug 30393: Make datatables wrapper handle searching for %, _, \

This patch makes searching for '%','_' and '\' work by escaping those
symbols in the query before sending them to the API.

To test:
1. Go to the cities page
2. Add two cities:
   - 'Cordoba %'
   - 'Buenos Aires _'
   - 'London \'
3. Use the column search on the name, alternating _, \ and % as the query
=> FAIL: Weird behavior
4. Apply this patch and reload
5. Repeat 3
=> SUCCESS: Filtering works correctly!
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Séverine Queune <severine.queune@bulac.fr>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/intranet-tmpl/prog/js/datatables.js