diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index bb01f318e..6cc40ea5d 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -113,7 +113,7 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False): else: sanitized = re.sub('(^|\s|\n|
)\/?((r|u)\/\w{3,25})', r'\1\2', sanitized) - for i in re.finditer('(^|\s|\n|
)@((\w|-){1,25})($|\s|\n|<\p>)', sanitized): + for i in re.finditer('(^|\s|\n|
)@((\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): diff --git a/files/routes/login.py b/files/routes/login.py index bdeb5b44e..ff479a9ec 100644 --- a/files/routes/login.py +++ b/files/routes/login.py @@ -14,7 +14,7 @@ def login_get(v): redir = request.values.get("redirect") if redir: - redir = replace("/logged_out", "").strip() + redir = redir.replace("/logged_out", "").strip() if not redir.startswith(request.host_url) and not redir.startswith('/'): redir = None if v and redir: return redirect(redir) @@ -142,7 +142,7 @@ def login_post(): redir = request.values.get("redirect") if redir: - redir = replace("/logged_out", "").strip() + redir = redir.replace("/logged_out", "").strip() if not redir.startswith(request.host_url) and not redir.startswith('/'): redir = '/' return redirect(redir)