View | Details | Raw Unified | Return to bug 33407
Collapse All | Expand All

(-)a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm (-1 / +3 lines)
Lines 1024-1029 sub clean_search_term { Link Here
1024
    # screen all brackets with backslash
1024
    # screen all brackets with backslash
1025
    $term =~ s/(?<!\\)(?:[\\]{2})*([\{\}\[\]])$lookahead/\\$1/g;
1025
    $term =~ s/(?<!\\)(?:[\\]{2})*([\{\}\[\]])$lookahead/\\$1/g;
1026
1026
1027
    # remove problematic punctuation and escaped slashes surrounded by spaces if truncate
1028
    $term =~ s/\s+(\s*[&;,:\.=\-\/]|(\\\/)\s*)+\s$lookahead/ /g if $truncate;
1029
1027
    # restore all regex contents after escaping brackets:
1030
    # restore all regex contents after escaping brackets:
1028
    for (my $i = 0; $i < @saved_regexes; $i++) {
1031
    for (my $i = 0; $i < @saved_regexes; $i++) {
1029
        $term =~ s/~~RE$i~~/$saved_regexes[$i]/;
1032
        $term =~ s/~~RE$i~~/$saved_regexes[$i]/;
1030
- 

Return to bug 33407