Skip to content

Commit

Permalink
Merge pull request #1016 from calzoneman/fix-url-case-sensitivity
Browse files Browse the repository at this point in the history
url: handle capitalized URLs
  • Loading branch information
Elad Alfassa committed Jan 31, 2016
2 parents ed5a218 + 0cefbf2 commit f4279e6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sopel/modules/url.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def setup(bot=None):
bot.memory['last_seen_url'] = tools.SopelMemory()

url_finder = re.compile(r'(?u)(%s?(?:http|https|ftp)(?:://\S+))' %
(bot.config.url.exclusion_char))
(bot.config.url.exclusion_char), re.IGNORECASE)


@commands('title')
Expand Down Expand Up @@ -123,6 +123,9 @@ def title_auto(bot, trigger):
return

urls = re.findall(url_finder, trigger)
if len(urls) == 0:
return

results = process_urls(bot, trigger, urls)
bot.memory['last_seen_url'][trigger.sender] = urls[-1]

Expand Down

0 comments on commit f4279e6

Please sign in to comment.