censor post titles in /log

remotes/1693045480750635534/spooky-22
Aevann1 2022-08-21 19:08:48 +02:00
parent 9dba3240c3
commit f7356c0843
1 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import time
from files.helpers.lazy import lazy
from copy import deepcopy
from files.helpers.const import *
from files.helpers.regex import censor_slurs
class ModAction(Base):
__tablename__ = "modactions"
@ -89,7 +90,7 @@ class ModAction(Base):
if self.target_user: return f'<a href="{self.target_user.url}">{self.target_user.username}</a>'
elif self.target_post:
if self.target_post.club: return f'<a href="{self.target_post.permalink}">{CC} ONLY</a>'
return f'<a href="{self.target_post.permalink}">{self.target_post.title_html}</a>'
return censor_slurs(f'<a href="{self.target_post.permalink}">{self.target_post.title_html}</a>', None)
elif self.target_comment_id: return f'<a href="/comment/{self.target_comment_id}?context=8#context">comment</a>'
@property