fdsfsdsfdrt
This commit is contained in:
parent
499fb3671d
commit
1c624eb7c0
3 changed files with 43 additions and 14 deletions
|
@ -249,8 +249,11 @@ def edit_post(pid, v):
|
|||
elif len(body) > 140: return {"error":"You have to type less than 140 characters!"}, 403
|
||||
|
||||
if title != p.title:
|
||||
for k, l in AJ_REPLACEMENTS.items(): title = title.replace(k, l)
|
||||
title = title.upper()
|
||||
if v.agendaposter:
|
||||
for k, l in AJ_REPLACEMENTS.items(): title = title.replace(k, l)
|
||||
title = title.replace('I ', f'@{v.username}')
|
||||
title = censor_slurs2(title).upper().replace(' ME ', f'@{v.username}')
|
||||
|
||||
title_html = filter_title(title)
|
||||
if v.marseyawarded and len(list(re.finditer('>[^<\s+]|[^>\s+]<', title_html))) > 0: return {"error":"You can only type marseys!"}, 403
|
||||
p.title = title
|
||||
|
@ -260,8 +263,10 @@ def edit_post(pid, v):
|
|||
for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif|webp|PNG|JPG|JPEG|GIF|WEBP|9999))', body, re.MULTILINE):
|
||||
if "wikipedia" not in i.group(1): body = body.replace(i.group(1), f'})')
|
||||
|
||||
for k, l in AJ_REPLACEMENTS.items(): body = body.replace(k, l)
|
||||
body = body.upper()
|
||||
if v.agendaposter:
|
||||
for k, l in AJ_REPLACEMENTS.items(): body = body.replace(k, l)
|
||||
body = body.replace('I ', f'@{v.username}')
|
||||
body = censor_slurs2(body).upper().replace(' ME ', f'@{v.username}')
|
||||
|
||||
body_html = sanitize(CustomRenderer().render(mistletoe.Document(body)))
|
||||
|
||||
|
@ -540,8 +545,12 @@ def submit_post(v):
|
|||
|
||||
title = request.values.get("title", "").strip()
|
||||
url = request.values.get("url", "").strip()
|
||||
for k, l in AJ_REPLACEMENTS.items(): title = title.replace(k, l)
|
||||
title = title.upper()
|
||||
|
||||
if v.agendaposter:
|
||||
for k, l in AJ_REPLACEMENTS.items(): title = title.replace(k, l)
|
||||
title = title.replace('I ', f'@{v.username}')
|
||||
title = censor_slurs2(title).upper().replace(' ME ', f'@{v.username}')
|
||||
|
||||
title_html = filter_title(title)
|
||||
body = request.values.get("body", "").strip()
|
||||
|
||||
|
@ -721,8 +730,10 @@ def submit_post(v):
|
|||
options.append(i.group(1))
|
||||
body = body.replace(i.group(0), "")
|
||||
|
||||
for k, l in AJ_REPLACEMENTS.items(): body = body.replace(k, l)
|
||||
body = body.upper()
|
||||
if v.agendaposter:
|
||||
for k, l in AJ_REPLACEMENTS.items(): body = body.replace(k, l)
|
||||
body = body.replace('I ', f'@{v.username}')
|
||||
body = censor_slurs2(body).upper().replace(' ME ', f'@{v.username}')
|
||||
|
||||
body_html = sanitize(CustomRenderer().render(mistletoe.Document(body)))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue