bashfaq/bashpf: Quotemeta $query

This commit is contained in:
Pragmatic Software 2021-05-23 21:19:19 -07:00
parent b9b1259e93
commit 84d9399ceb
2 changed files with 2 additions and 2 deletions

2
modules/bashfaq.pl vendored
View File

@ -29,7 +29,7 @@ if (exists $faq{$query}) {
$match = $query; $match = $query;
} else { } else {
foreach my $key (keys %faq) { foreach my $key (keys %faq) {
if ($faq{$key} =~ /$query/i) { if ($faq{$key} =~ /\Q$query\E/i) {
$match = $key; $match = $key;
last; last;
} }

2
modules/bashpf.pl vendored
View File

@ -29,7 +29,7 @@ if (exists $pf{$query}) {
$match = $query; $match = $query;
} else { } else {
foreach my $key (keys %pf) { foreach my $key (keys %pf) {
if ($pf{$key} =~ /$query/i) { if ($pf{$key} =~ /\Q$query\E/i) {
$match = $key; $match = $key;
last; last;
} }