removing [ and ] in query hilighting
authorPaul POULAIN <paul@koha-fr.org>
Mon, 22 Oct 2007 08:19:52 +0000 (03:19 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Mon, 22 Oct 2007 12:24:55 +0000 (07:24 -0500)
otherwise, we have a regexp error 4 lines later

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Search.pm

index 9b21dfd..d32a3d8 100644 (file)
@@ -962,7 +962,7 @@ sub searchResults {
             #warn "term: $term";
             my $old_term = $term;
             if ( length($term) > 3 ) {
-                $term =~ s/(.*=|\)|\(|\+|\.|\?)//g;
+                $term =~ s/(.*=|\)|\(|\+|\.|\?|\[|\])//g;
 
                 #FIXME: is there a better way to do this?
                 $oldbiblio->{'title'} =~ s/$term/<span class=term>$&<\/span>/gi;