Browse Source

Don't match invalid chars in URLs

dave/xdcc
dave 5 years ago
parent
commit
9b225b87cc
  1. 3
      pyircbot/modules/LinkTitler.py

3
pyircbot/modules/LinkTitler.py

@ -79,7 +79,8 @@ class LinkTitler(ModuleBase):
# subreddits
# generic <title>
matches = re.compile(r'(https?://([a-zA-Z0-9_\-\.]+/([^ ]+)?))').findall(trailing)
matches = re.compile(r'(https?://([a-zA-Z0-9_\-\.]+/([A-Za-z0-9\-\._~:\/?#[]@!$&\'\(\)\*\+\,\;=]+)?))') \
.findall(trailing)
if matches:
done = []
for match in matches:

Loading…
Cancel
Save