Fixes failing links

This commit is contained in:
Mouse Reeve 2021-07-07 09:49:22 -07:00
parent b3cd9483d3
commit 23631c3c4f

View file

@ -150,7 +150,7 @@ def find_mentions(content):
def format_links(content):
"""detect and format links"""
return re.sub(
r'([^(href=")]|^|\()(https?:\/\/(%s([\w\.\-_\/+&\?=:;,])*))' % regex.DOMAIN,
r'([^(href=")]|^|\()(https?:\/\/(%s([\w\.\-_\/+&\?=:;,@#])*))' % regex.DOMAIN,
r'\g<1><a href="\g<2>">\g<3></a>',
content,
)