Skip to content

Commit 6b0741c

Browse files
authored
Fix faulty regex filters in migration 59
Migration 59 populated the filters table with regex filters, some of which were faulty because the `\b` character wasn't escaped. This is fixed in this PR by making all patterns raw strings.
1 parent 4ab7972 commit 6b0741c

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

pydis_site/apps/api/migrations/0059_populate_filterlists.py

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -60,35 +60,35 @@
6060
]
6161

6262
filter_token_blacklist = [
63-
("\bgoo+ks*\b", None, False),
64-
("\bky+s+\b", None, False),
65-
("\bki+ke+s*\b", None, False),
66-
("\bbeaner+s?\b", None, False),
67-
("\bcoo+ns*\b", None, False),
68-
("\bnig+lets*\b", None, False),
69-
("\bslant-eyes*\b", None, False),
70-
("\btowe?l-?head+s*\b", None, False),
71-
("\bchi*n+k+s*\b", None, False),
72-
("\bspick*s*\b", None, False),
73-
("\bkill* +(?:yo)?urself+\b", None, False),
74-
("\bjew+s*\b", None, False),
75-
("\bsuicide\b", None, False),
76-
("\brape\b", None, False),
77-
("\b(re+)tar+(d+|t+)(ed)?\b", None, False),
78-
("\bta+r+d+\b", None, False),
79-
("\bcunts*\b", None, False),
80-
("\btrann*y\b", None, False),
81-
("\bshemale\b", None, False),
82-
("fa+g+s*", None, False),
83-
("卐", None, False),
84-
("卍", None, False),
85-
("࿖", None, False),
86-
("࿕", None, False),
87-
("࿘", None, False),
88-
("࿗", None, False),
89-
("cuck(?!oo+)", None, False),
90-
("nigg+(?:e*r+|a+h*?|u+h+)s?", None, False),
91-
("fag+o+t+s*", None, False),
63+
(r"\bgoo+ks*\b", None, False),
64+
(r"\bky+s+\b", None, False),
65+
(r"\bki+ke+s*\b", None, False),
66+
(r"\bbeaner+s?\b", None, False),
67+
(r"\bcoo+ns*\b", None, False),
68+
(r"\bnig+lets*\b", None, False),
69+
(r"\bslant-eyes*\b", None, False),
70+
(r"\btowe?l-?head+s*\b", None, False),
71+
(r"\bchi*n+k+s*\b", None, False),
72+
(r"\bspick*s*\b", None, False),
73+
(r"\bkill* +(?:yo)?urself+\b", None, False),
74+
(r"\bjew+s*\b", None, False),
75+
(r"\bsuicide\b", None, False),
76+
(r"\brape\b", None, False),
77+
(r"\b(re+)tar+(d+|t+)(ed)?\b", None, False),
78+
(r"\bta+r+d+\b", None, False),
79+
(r"\bcunts*\b", None, False),
80+
(r"\btrann*y\b", None, False),
81+
(r"\bshemale\b", None, False),
82+
(r"fa+g+s*", None, False),
83+
(r"卐", None, False),
84+
(r"卍", None, False),
85+
(r"࿖", None, False),
86+
(r"࿕", None, False),
87+
(r"࿘", None, False),
88+
(r"࿗", None, False),
89+
(r"cuck(?!oo+)", None, False),
90+
(r"nigg+(?:e*r+|a+h*?|u+h+)s?", None, False),
91+
(r"fag+o+t+s*", None, False),
9292
]
9393

9494
file_format_whitelist = [

0 commit comments

Comments
 (0)