diff --git a/files/helpers/const.py b/files/helpers/const.py index 9d29b58a34..a88bd5d183 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -180,7 +180,7 @@ PUSHER_INSTANCE_ID = '02ddcc80-b8db-42be-9022-44c546b4dce6' PUSHER_KEY = environ.get("PUSHER_KEY", "").strip() single_words = "|".join([slur.lower() for slur in SLURS.keys()]) -SLUR_REGEX = re.compile(rf"(?i)(?<=\s|>)({single_words})(?=[\s<,.]|s[\s<,.])") +SLUR_REGEX = re.compile(rf"(?i)(?<=\s|>|^)({single_words})(?=[\s<,.]|s[\s<,.]|$)") def sub_matcher(match: re.Match) -> str: return SLURS[match.group(0).lower()] diff --git a/files/templates/admin/awards.html b/files/templates/admin/awards.html index a7c7e159da..a0c14c697a 100644 --- a/files/templates/admin/awards.html +++ b/files/templates/admin/awards.html @@ -53,7 +53,7 @@ {{a['title']}} - + {% endfor %}