fdsfds
This commit is contained in:
parent
7fe7d9c9ca
commit
28faec1a38
3 changed files with 18 additions and 10 deletions
|
@ -5698,7 +5698,3 @@ blockquote p {
|
|||
.text-lightblue {
|
||||
color: lightblue;
|
||||
}
|
||||
|
||||
p *, .post-title, .post-body *, .comment-text * {
|
||||
text-transform: uppercase !important;
|
||||
}
|
|
@ -157,7 +157,9 @@ def api_comment(v):
|
|||
else: top_comment_id = parent.top_comment_id
|
||||
else: abort(400)
|
||||
|
||||
body = request.values.get("body", "").strip()[:10000]
|
||||
body = request.values.get("body", "").strip()[:10000].replace(' ','\n')
|
||||
for i in re.finditer('(^|\n)(?!.*http)(.*)', body):
|
||||
body = body.replace(i.group(2), i.group(2).upper())
|
||||
|
||||
if v.marseyawarded:
|
||||
if time.time() > v.marseyawarded:
|
||||
|
@ -615,7 +617,9 @@ def edit_comment(cid, v):
|
|||
|
||||
if c.is_banned or c.deleted_utc > 0: abort(403)
|
||||
|
||||
body = request.values.get("body", "").strip()[:10000]
|
||||
body = request.values.get("body", "").strip()[:10000].replace(' ','\n')
|
||||
for i in re.finditer('(^|\n)(?!.*http)(.*)', body):
|
||||
body = body.replace(i.group(2), i.group(2).upper())
|
||||
if len(body) < 1: return {"error":"You have to actually type something!"}, 400
|
||||
|
||||
if body != c.body and body != "":
|
||||
|
|
|
@ -335,8 +335,12 @@ def edit_post(pid, v):
|
|||
|
||||
if p.author_id != v.id and not (v.admin_level > 1 and v.admin_level > 2): abort(403)
|
||||
|
||||
title = request.values.get("title", "").strip()
|
||||
body = request.values.get("body", "").strip()
|
||||
title = request.values.get("title", "").strip().replace(' ','\n')
|
||||
for i in re.finditer('(^|\n)(?!.*http)(.*)', title):
|
||||
title = title.replace(i.group(2), i.group(2).upper())
|
||||
body = request.values.get("body", "").strip().replace(' ','\n')
|
||||
for i in re.finditer('(^|\n)(?!.*http)(.*)', body):
|
||||
body = body.replace(i.group(2), i.group(2).upper())
|
||||
|
||||
if len(body) > 10000: return {"error":"Character limit is 10000!"}, 403
|
||||
|
||||
|
@ -669,7 +673,9 @@ def submit_post(v):
|
|||
if request.content_length > 8 * 1024 * 1024: return "Max file size is 8 MB.", 413
|
||||
elif request.content_length > 4 * 1024 * 1024: return "Max file size is 4 MB.", 413
|
||||
|
||||
title = request.values.get("title", "").strip()[:500]
|
||||
title = request.values.get("title", "").strip()[:500].replace(' ','\n')
|
||||
for i in re.finditer('(^|\n)(?!.*http)(.*)', title):
|
||||
title = title.replace(i.group(2), i.group(2).upper())
|
||||
url = request.values.get("url", "").strip()
|
||||
|
||||
if v.agendaposter and not v.marseyawarded:
|
||||
|
@ -678,7 +684,9 @@ def submit_post(v):
|
|||
title = censor_slurs2(title).upper().replace(' ME ', f' @{v.username} ')
|
||||
|
||||
title_html = filter_emojis_only(title)
|
||||
body = request.values.get("body", "").strip()
|
||||
body = request.values.get("body", "").strip().replace(' ','\n')
|
||||
for i in re.finditer('(^|\n)(?!.*http)(.*)', body):
|
||||
body = body.replace(i.group(2), i.group(2).upper())
|
||||
|
||||
if v.marseyawarded and len(list(re.finditer('>[^<\s+]|[^>\s+]<', title_html))) > 0: return {"error":"You can only type marseys!"}, 40
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue