Fix passing regex characters to the highlighter, which makes it break. Fixes bug #11311.

This commit is contained in:
Colin Kuskie 2009-12-21 11:38:52 -08:00
parent 4316cd218f
commit 12e160bf8c
3 changed files with 49 additions and 8 deletions

View file

@ -195,7 +195,7 @@ sub view {
$search->search(\%rules);
#Instantiate the highlighter
my @words = split(/\s+/,$keywords);
my @words = grep { $_ ne '' } map { tr/+?*//d; $_; } split(/\s+/,$keywords);
my @wildcards = map { "%" } @words;
my $hl = HTML::Highlight->new(
words => \@words,