mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-19 06:36:35 +00:00
Merge pull request #1216 from bookwyrm-social/link-formatting
Fixes detection of links with certain characters
This commit is contained in:
commit
b1022cf245
1 changed files with 1 additions and 1 deletions
|
@ -150,7 +150,7 @@ def find_mentions(content):
|
||||||
def format_links(content):
|
def format_links(content):
|
||||||
"""detect and format links"""
|
"""detect and format links"""
|
||||||
return re.sub(
|
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>',
|
r'\g<1><a href="\g<2>">\g<3></a>',
|
||||||
content,
|
content,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue