diff --git a/files/helpers/const.py b/files/helpers/const.py index 2a69ecbfa..bf7db5c5c 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -38,7 +38,7 @@ SLURS = { "oldfag": "oldstrag", "faggotry": "cute twinkry", "faggot": "cute twink", - "fag": "cute twink", + " fag ": "cute twink", "pedophile": "libertarian", " pedo": "libertarian", "kill yourself": "keep yourself safe", @@ -713,7 +713,7 @@ email_regex = re.compile('([A-Za-z0-9]+[.-_])*[A-Za-z0-9]+@[A-Za-z0-9-]+(\.[A-Z| utm_regex = re.compile('utm_[a-z]+=[a-z0-9_]+&', flags=re.A) utm_regex2 = re.compile('[?&]utm_[a-z]+=[a-z0-9_]+', flags=re.A) -slur_regex = re.compile(f"(

[^<]*)({single_words.upper()})", flags=re.I|re.A) +slur_regex = re.compile(f"(

[^<]*)({single_words})", flags=re.I|re.A) slur_regex_upper = re.compile(f"(

[^<]*)({single_words.upper()})", flags=re.A) torture_regex = re.compile('(^|\s)(i|me) ', flags=re.I|re.A) torture_regex2 = re.compile("(^|\s)i'm ", flags=re.I|re.A) diff --git a/files/routes/posts.py b/files/routes/posts.py index 921e6f37c..5c67adb21 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -46,7 +46,7 @@ def toggle_club(pid, v): if v.club_allowed == False: abort(403) post = get_post(pid) - if post.author_id != v.id and v.admin_level < 2: abort(403) + if v.admin_level < 2: abort(403) post.club = not post.club g.db.add(post)