From 84d9399cebd7329401f10dc7467350667919506b Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sun, 23 May 2021 21:19:19 -0700 Subject: [PATCH] bashfaq/bashpf: Quotemeta $query --- modules/bashfaq.pl | 2 +- modules/bashpf.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/bashfaq.pl b/modules/bashfaq.pl index 9fd7cb42..2fad3a1d 100755 --- a/modules/bashfaq.pl +++ b/modules/bashfaq.pl @@ -29,7 +29,7 @@ if (exists $faq{$query}) { $match = $query; } else { foreach my $key (keys %faq) { - if ($faq{$key} =~ /$query/i) { + if ($faq{$key} =~ /\Q$query\E/i) { $match = $key; last; } diff --git a/modules/bashpf.pl b/modules/bashpf.pl index 8454daa8..0cc6048e 100755 --- a/modules/bashpf.pl +++ b/modules/bashpf.pl @@ -29,7 +29,7 @@ if (exists $pf{$query}) { $match = $query; } else { foreach my $key (keys %pf) { - if ($pf{$key} =~ /$query/i) { + if ($pf{$key} =~ /\Q$query\E/i) { $match = $key; last; }