summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Search.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Search.pm')
-rw-r--r--Bugzilla/Search.pm7
1 files changed, 2 insertions, 5 deletions
diff --git a/Bugzilla/Search.pm b/Bugzilla/Search.pm
index 4b21b216b..557af6646 100644
--- a/Bugzilla/Search.pm
+++ b/Bugzilla/Search.pm
@@ -879,12 +879,9 @@ sub GetByWordList {
my $word = $w;
if ($word ne "") {
$word =~ tr/A-Z/a-z/;
- $word = $dbh->quote(quotemeta($word));
+ $word = $dbh->quote('(^|[^a-z0-9])' . quotemeta($word) . '($|[^a-z0-9])');
trick_taint($word);
- $word =~ s/^'//;
- $word =~ s/'$//;
- $word = '(^|[^a-z0-9])' . $word . '($|[^a-z0-9])';
- push(@list, $dbh->sql_regexp($field, "'$word'"));
+ push(@list, $dbh->sql_regexp($field, $word));
}
}