diff --git a/files/classes/comment.py b/files/classes/comment.py index d89aa2ab9..bfca580b8 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -375,7 +375,8 @@ class Comment(Base): if not body: return "" if not (self.parent_post and self.post.sub == 'chudrama'): - body = censor_slurs(body, v).replace(f':marseytrain:', ':marseytrain:') + body = censor_slurs(body, v) + body = replace_train_html(body) return body diff --git a/files/classes/post.py b/files/classes/post.py index 98ae9b750..0a1e02fb8 100644 --- a/files/classes/post.py +++ b/files/classes/post.py @@ -323,7 +323,8 @@ class Post(Base): if not body: return "" if self.sub != 'chudrama': - body = censor_slurs(body, v).replace(f':marseytrain:', ':marseytrain:') + body = censor_slurs(body, v) + body = replace_train_html(body) body = normalize_urls_runtime(body, v) @@ -343,7 +344,8 @@ class Post(Base): title = self.title if self.sub != 'chudrama': - title = censor_slurs(title, v).replace(f':marseytrain:', ':marseytrain:') + title = censor_slurs(title, v) + title = replace_train_html(title) return title diff --git a/files/helpers/config/const.py b/files/helpers/config/const.py index 63b24b5fe..cdd702f92 100644 --- a/files/helpers/config/const.py +++ b/files/helpers/config/const.py @@ -119,7 +119,20 @@ GIRL_PHRASES = [ "$ PERIODT" ] +tranny = f':marseytrain:' +trannie = f':!marseytrain:' +troon = f':marseytrain2:' + +def replace_train_html(body): + body = body.replace(tranny, ':marseytrain:') + body = body.replace(trannie, ':!marseytrain:') + body = body.replace(troon, ':marseytrain2:') + return body + SLURS = { + "tranny": tranny, + "trannie": trannie, + "troon": troon, "(?', - "tranny": f':marseytrain:', - "troon": f':marseytrain:', - "tranner": f':marseytrain:', "kike": "jewish chad", "(?