From dd93ad4e6e373b506493b12fdb17f93d09342dad Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 4 Nov 2021 18:08:35 +0000 Subject: [PATCH] Bug 29418: Screen ending colons from search term Signed-off-by: Martin Renvoize --- Koha/SearchEngine/Zebra/QueryBuilder.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Koha/SearchEngine/Zebra/QueryBuilder.pm b/Koha/SearchEngine/Zebra/QueryBuilder.pm index b0011d09a9..0d0fe2ff5e 100644 --- a/Koha/SearchEngine/Zebra/QueryBuilder.pm +++ b/Koha/SearchEngine/Zebra/QueryBuilder.pm @@ -127,6 +127,8 @@ sub build_authorities_query_compat { sub clean_search_term { my ( $self, $term ) = @_; + $term =~ s/([\s\\]*:\s*)+$//; + return $term; } -- 2.20.1