diff --git a/C4/Search.pm b/C4/Search.pm index b84a528b94..5f15f964de 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -722,10 +722,6 @@ sub buildQuery { $weight_fields = 0 if $operands[$i] =~ /(:|=)/; my $operand = $operands[$i]; - - my $sanatized_operand = $operands[$i]; - $sanatized_operand =~ s/://g; - my $index = $indexes[$i]; # if there's no index, don't use one, it will throw a CCL error @@ -794,7 +790,7 @@ sub buildQuery { $query .= " $operand"; $query_cgi .="&op=$operators[$i-1]"; $query_cgi .="&idx=$index" if $index; - $query_cgi .="&q=$sanatized_operand" if $sanatized_operand; + $query_cgi .="&q=$operands[$i]" if $operands[$i]; $query_search_desc .=" $operators[$i-1] $index_plus $operands[$i]"; } @@ -804,7 +800,7 @@ sub buildQuery { $query .= "$index_plus " unless $indexes_set; $query .= "$operand"; $query_cgi .="&op=and&idx=$index" if $index; - $query_cgi .="&q=$sanatized_operand" if $sanatized_operand; + $query_cgi .="&q=$operands[$i]" if $operands[$i]; $query_search_desc .= " and $index_plus $operands[$i]"; } } @@ -815,7 +811,7 @@ sub buildQuery { $query .= $operand; $query_search_desc .= " $index_plus $operands[$i]"; $query_cgi.="&idx=$index" if $index; - $query_cgi.="&q=$sanatized_operand" if $sanatized_operand; + $query_cgi.="&q=$operands[$i]" if $operands[$i]; $previous_operand = 1; }