From aba2820dcc9320ab0873ed273c8ded1d2899f7e4 Mon Sep 17 00:00:00 2001 From: Aevann Date: Mon, 24 Apr 2023 08:58:31 +0200 Subject: [PATCH] fix internal server error for chudded ppl whose name starts with a number (like 911roofer) bc of invalid regex group reference (lol) --- files/helpers/sanitize.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index ee5c679ee..5c24dcb89 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -619,9 +619,9 @@ def torture_ap(string, username): if not string: return string for k, l in AJ_REPLACEMENTS.items(): string = string.replace(k, l) - string = torture_regex.sub(rf'\1{username}\3', string) - string = torture_regex2.sub(rf'\1{username} is\3', string) - string = torture_regex3.sub(rf"\1{username}'s\3", string) + string = torture_regex.sub(rf'\1@{username}\3', string) + string = torture_regex2.sub(rf'\1@{username} is\3', string) + string = torture_regex3.sub(rf"\1@{username}'s\3", string) return string def complies_with_chud(obj):