Don't match invalid chars in URLs

This commit is contained in:
dave 2017-11-16 17:17:17 -08:00
parent 2d463d9b99
commit 9b225b87cc
1 changed files with 2 additions and 1 deletions

View File

@ -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: