boobot: Ignore NBSP in URLs

This commit is contained in:
Laurent Bachelier 2013-05-05 21:10:15 +02:00
commit bba7898561

View file

@ -209,7 +209,7 @@ class Boobot(SingleServerIRCBot):
for m in re.findall('([\w\d_\-]+@\w+)', text):
for msg in self.on_boobid(m):
self.send_message(msg, channel)
for m in re.findall('(https?://\S+)', text):
for m in re.findall(u'(https?://[^\s\xa0+]+)', text):
for msg in self.on_url(m):
self.send_message(msg, channel)