This commit is contained in:
Aevann1 2021-12-11 18:22:25 +02:00
parent 6ff6ba299a
commit baec25a114
12 changed files with 19 additions and 35 deletions

View file

@ -157,10 +157,7 @@ def api_comment(v):
else: top_comment_id = parent.top_comment_id
else: abort(400)
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())
body = body.replace('\n\n','%&$').replace('\n',' ').replace('%&$','\n\n')
body = request.values.get("body", "").strip()[:10000]
if v.marseyawarded:
if time.time() > v.marseyawarded:
@ -618,10 +615,7 @@ def edit_comment(cid, v):
if c.is_banned or c.deleted_utc > 0: abort(403)
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())
body = body.replace('\n\n','%&$').replace('\n',' ').replace('%&$','\n\n')
body = request.values.get("body", "").strip()[:10000]
if len(body) < 1: return {"error":"You have to actually type something!"}, 400