[Koha-bugs] [Bug 30393] datatables wrapper should handle searching for %, _ and \

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Mar 30 12:29:55 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30393

Séverine Queune <severine.queune at bulac.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #132551|0                           |1
        is obsolete|                            |

--- Comment #3 from Séverine Queune <severine.queune at bulac.fr> ---
Created attachment 132553
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132553&action=edit
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 at theke.io>
Signed-off-by: Séverine Queune <severine.queune at bulac.fr>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list