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)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 1 Oct 2021 18:15:27 +0000 (14:15 -0400)
commit59c26ce5f35f3f18830090b048d0cd6c2a1eb6fc
treee343bc6e2bcbc5872d83228c7e544c47c5edc10e
parentcb156ac13224f03db8ce0bd1373335b7d4052437
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>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha/SearchEngine/Elasticsearch/QueryBuilder.pm