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

(-)a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm (-1 / +3 lines)
Lines 951-956 sub _clean_search_term { Link Here
951
    # and correctly ignore unevenly backslashed:
951
    # and correctly ignore unevenly backslashed:
952
    $term =~ s/((?<!\\)(?:[\\]{2})*:[^:\s]+(?<!\\)(?:[\\]{2})*)(?=:)/$1\\/g;
952
    $term =~ s/((?<!\\)(?:[\\]{2})*:[^:\s]+(?<!\\)(?:[\\]{2})*)(?=:)/$1\\/g;
953
953
954
    # screen all exclamation signs that either are the last symbol or have white space after them
955
    $term =~ s/(?:[\s\\]*!\s*)+(\s|$)/$1/g;
956
954
    # screen all brackets with backslash
957
    # screen all brackets with backslash
955
    $term =~ s/(?<!\\)(?:[\\]{2})*([\{\}\[\]])$lookahead/\\$1/g;
958
    $term =~ s/(?<!\\)(?:[\\]{2})*([\{\}\[\]])$lookahead/\\$1/g;
956
    return $term;
959
    return $term;
957
- 

Return to bug 28316