sdfsfd
This commit is contained in:
parent
0131ea4740
commit
e94937dc69
6 changed files with 41 additions and 10 deletions
|
@ -275,6 +275,17 @@ def edit_post(pid, v):
|
|||
body = body.replace('I ', f'@{v.username} ')
|
||||
body = censor_slurs2(body).upper().replace(' ME ', f' @{v.username} ')
|
||||
|
||||
if not p.options.count():
|
||||
for i in re.finditer('\s*\$\$([^\$\n]+)\$\$\s*', body):
|
||||
body = body.replace(i.group(0), "")
|
||||
c = Comment(author_id=AUTOPOLLER_ID,
|
||||
parent_submission=p.id,
|
||||
level=1,
|
||||
body_html=filter_title(i.group(1)),
|
||||
upvotes=0
|
||||
)
|
||||
g.db.add(c)
|
||||
|
||||
body_html = sanitize(CustomRenderer().render(mistletoe.Document(body)))
|
||||
|
||||
bans = filter_comment_html(body_html)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue