censor post titles in /log
parent
9dba3240c3
commit
f7356c0843
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue