support infinite length posts and comments (fixes #229)
This commit is contained in:
parent
44919507e9
commit
bfe8fb70f6
14 changed files with 99 additions and 32 deletions
|
@ -40,7 +40,7 @@ titleheaders = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWe
|
|||
|
||||
MAX_TITLE_LENGTH = 500
|
||||
MAX_URL_LENGTH = 2048
|
||||
MAX_BODY_LENGTH = 20000
|
||||
MAX_BODY_LENGTH = SUBMISSION_BODY_LENGTH_MAXIMUM
|
||||
|
||||
|
||||
def guarded_value(val, min_len, max_len) -> str:
|
||||
|
@ -329,9 +329,6 @@ def edit_post(pid, v):
|
|||
body_html = sanitize(body, edit=True)
|
||||
|
||||
p.body = body
|
||||
|
||||
if len(body_html) > 40000: abort(400, "Submission body_html too long! (max 40k characters)")
|
||||
|
||||
p.body_html = body_html
|
||||
|
||||
if not p.private and not p.ghost:
|
||||
|
@ -737,8 +734,6 @@ def submit_post(v, sub=None):
|
|||
|
||||
body_html = sanitize(body)
|
||||
|
||||
if len(body_html) > 40000: return error("Submission body_html too long! (max 40k characters)")
|
||||
|
||||
club = bool(request.values.get("club",""))
|
||||
|
||||
if embed and len(embed) > 1500: embed = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue