diff --git a/files/helpers/slurs_and_profanities.py b/files/helpers/slurs_and_profanities.py
index 6d60ed56d..5251e98a7 100644
--- a/files/helpers/slurs_and_profanities.py
+++ b/files/helpers/slurs_and_profanities.py
@@ -1,6 +1,5 @@
import re
from .config.const import *
-from .regex import NOT_IN_CODE_OR_LINKS
tranny = f''
trannie = f'
'
@@ -107,9 +106,8 @@ PROFANITIES = {
slur_single_words = "|".join([slur.lower() for slur in SLURS.keys()])
profanity_single_words = "|".join([profanity.lower() for profanity in PROFANITIES.keys()])
-
-slur_regex = re.compile(f"(<[^>]*>|{slur_single_words})" + NOT_IN_CODE_OR_LINKS, flags=re.I|re.A)
-profanity_regex = re.compile(f"(<[^>]*>|{profanity_single_words})" + NOT_IN_CODE_OR_LINKS, flags=re.I|re.A)
+slur_regex = re.compile(f"<[^>]*>|{slur_single_words}", flags=re.I|re.A)
+profanity_regex = re.compile(f"<[^>]*>|{profanity_single_words}", flags=re.I|re.A)
SLURS_FOR_REPLACING = {}
for k, val in SLURS.items():
@@ -152,6 +150,9 @@ def sub_matcher_profanities(match):
def censor_slurs_profanities(body, logged_user, is_plain=False):
if not body: return ""
+ if '
' in body or '' in body:
+ return body
+
if not logged_user or logged_user == 'chat' or logged_user.slurreplacer:
body = slur_regex.sub(sub_matcher_slurs, body)