forked from MarseyWorld/MarseyWorld
master
parent
a09ef26d52
commit
c05a8d8df0
|
@ -113,7 +113,7 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False):
|
|||
else:
|
||||
sanitized = re.sub('(^|\s|\n|<p>)\/?((r|u)\/\w{3,25})', r'\1<a href="https://old.reddit.com/\2" rel="nofollow noopener noreferrer">\2</a>', sanitized)
|
||||
|
||||
for i in re.finditer('(^|\s|\n|<p>)@((\w|-){1,25})($|\s|\n|</p>)', sanitized):
|
||||
for i in re.finditer('(^|\s|\n|<p>)@((\w|-){1,25})($|\s|\n|</p>| )', sanitized):
|
||||
u = get_user(i.group(2), graceful=True)
|
||||
|
||||
if u and (not g.v.any_block_exists(u) or g.v.admin_level > 1):
|
||||
|
|
Loading…
Reference in New Issue