Bug 28316: avoid messing up regexes in the search queries
authorPetro Vashchuk <stalkernoid@gmail.com>
Mon, 14 Jun 2021 13:38:51 +0000 (16:38 +0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 20 Sep 2021 12:04:48 +0000 (14:04 +0200)
commit3ce2810324fc28d5f9c9791ee7ec7805df94ff3e
tree3f3e19ebd7e0b4c82f7ad4a4e01f41d3ba105df2
parent0083f96bc9238148a67a58512331144e28b08c94
Bug 28316: avoid messing up regexes in the search queries

This patch ensures that the behavior with
QueryRegexEscapeOptions set to values other than
"Escape" still will works as expected.

It does so by storing the contents of regexes
before escaping special characters and
then restores the contents of regexes back to how
it was before, ensuring that searching with regex is possible.

Signed-off-by: Alex Buckley <alexbuckley@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/SearchEngine/Elasticsearch/QueryBuilder.pm