Skip to content

Commit

Permalink
Merge pull request #1713 from sopel-irc/search-duck-whitespace
Browse files Browse the repository at this point in the history
search: don't unquote DDG result
  • Loading branch information
dgw authored Nov 11, 2019
2 parents 04a530b + 5755921 commit 96f030b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sopel/modules/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ def duck_search(query):
bytes = bytes.split('web-result')[1]
m = r_duck.search(bytes)
if m:
unquoted_m = web.unquote(m.group(1))
return web.decode(unquoted_m)
return web.decode(m.group(1))


# Alias google_search to duck_search
Expand Down Expand Up @@ -92,7 +91,7 @@ def duck_api(query):
# test for bad Unicode handling in py2
@example(
'.duck grandorder.wiki chulainn alter',
'https://grandorder.wiki/Cú_Chulainn_(Alter)',
r'https://grandorder.wiki/C%C3%BA_Chulainn_(Alter)',
online=True)
# the last example (in source line order) is what .help displays
@example(
Expand Down

0 comments on commit 96f030b

Please sign in to comment.