forked from MarseyWorld/MarseyWorld
fdsfds
parent
12e35f26d2
commit
331b37a8b9
|
@ -335,10 +335,7 @@ def edit_post(pid, v):
|
||||||
|
|
||||||
if p.author_id != v.id and not (v.admin_level > 1 and v.admin_level > 2): abort(403)
|
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().replace(' ','\n')
|
title = request.values.get("title", "").strip().upper()
|
||||||
for i in re.finditer('(^|\n)(?!.*http)(.*)', title):
|
|
||||||
title = title.replace(i.group(2), i.group(2).upper())
|
|
||||||
title = title.replace('\n\n','%&$').replace('\n',' ').replace('%&$','\n\n')
|
|
||||||
|
|
||||||
body = request.values.get("body", "").strip().replace(' ','\n')
|
body = request.values.get("body", "").strip().replace(' ','\n')
|
||||||
for i in re.finditer('(^|\n)(?!.*http)(.*)', body):
|
for i in re.finditer('(^|\n)(?!.*http)(.*)', body):
|
||||||
|
@ -676,10 +673,7 @@ def submit_post(v):
|
||||||
if request.content_length > 8 * 1024 * 1024: return "Max file size is 8 MB.", 413
|
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
|
elif request.content_length > 4 * 1024 * 1024: return "Max file size is 4 MB.", 413
|
||||||
|
|
||||||
title = request.values.get("title", "").strip()[:500].replace(' ','\n')
|
title = request.values.get("title", "").strip()[:500].upper()
|
||||||
for i in re.finditer('(^|\n)(?!.*http)(.*)', title):
|
|
||||||
title = title.replace(i.group(2), i.group(2).upper())
|
|
||||||
title = title.replace('\n\n','%&$').replace('\n',' ').replace('%&$','\n\n')
|
|
||||||
|
|
||||||
url = request.values.get("url", "").strip()
|
url = request.values.get("url", "").strip()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue