Merge pull request #671 from duckduckgo/zaahir/update-urldecode-triggers

reign in triggering of URLDecode
master
Jag Talon 2014-10-07 12:55:30 -04:00
commit 6b9f116654
1 changed files with 4 additions and 0 deletions

View File

@ -21,6 +21,10 @@ category 'computing_tools';
topics 'programming', 'web_design';
handle query_raw => sub {
# unless trigger words exist, only answer when we have a single word
unless (m/$trigger_words/) {
return if m/\s+/;
}
#remove triggers and trim
s/(^$trigger_words)|($trigger_words$)//i;
s/(^\s+)|(\s+$)//;