Fix passing regex characters to the highlighter, which makes it break. Fixes bug #11311.
This commit is contained in:
parent
4316cd218f
commit
12e160bf8c
3 changed files with 49 additions and 8 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue