fix tranny slur replacement in plainbody and plaintitle

remotes/1693176582716663532/tmp_refs/heads/watchparty
Aevann1 2022-10-07 00:34:25 +02:00
parent dc93b5b7d2
commit 3ffac6f0f6
2 changed files with 5 additions and 3 deletions

View File

@ -404,7 +404,9 @@ class Comment(Base):
if not body: return ""
return censor_slurs(body, v)
body = censor_slurs(body, v).replace('<img loading="lazy" data-bs-toggle="tooltip" alt=":marseytrain:" title=":marseytrain:" src="/e/marseytrain.webp">', ':marseytrain:')
return body
@lazy
def collapse_for_user(self, v, path):

View File

@ -411,7 +411,7 @@ class Submission(Base):
if not body: return ""
body = censor_slurs(body, v)
body = censor_slurs(body, v).replace('<img loading="lazy" data-bs-toggle="tooltip" alt=":marseytrain:" title=":marseytrain:" src="/e/marseytrain.webp">', ':marseytrain:')
body = normalize_urls_runtime(body, v)
return body
@ -436,7 +436,7 @@ class Submission(Base):
else: return f'{CC} MEMBERS ONLY'
else: title = self.title
title = censor_slurs(title, v)
title = censor_slurs(title, v).replace('<img loading="lazy" data-bs-toggle="tooltip" alt=":marseytrain:" title=":marseytrain:" src="/e/marseytrain.webp">', ':marseytrain:')
return title