From 5e7c86026e0a42ff15bd16fedab248381f159c1b Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 20 Oct 2024 18:27:34 +0300 Subject: [PATCH] linkify post links and comment links in shadowban reason --- files/routes/admin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/files/routes/admin.py b/files/routes/admin.py index 13ed30480..7744e940f 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -891,6 +891,9 @@ def shadowban(user_id, v): if len(reason) > BAN_REASON_HTML_LENGTH_LIMIT: stop(400, "Rendered shadowban reason is too long!") + reason = reason_regex_post.sub(r'\1', reason) + reason = reason_regex_comment.sub(r'\1', reason) + user.shadowban_reason = reason g.db.add(user) check_for_alts(user)