increase max sidebar character count from 500 to 10k
parent
fd87cb3ce2
commit
034e8fa5eb
|
@ -336,9 +336,9 @@ def post_sub_sidebar(v, sub):
|
|||
|
||||
if not v.mods(sub.name): abort(403)
|
||||
|
||||
sub.sidebar = request.values.get('sidebar', '').strip()[:500]
|
||||
sub.sidebar = request.values.get('sidebar', '').strip()[:10000]
|
||||
sub.sidebar_html = sanitize(sub.sidebar)
|
||||
if len(sub.sidebar_html) > 1000: return "Sidebar is too big!"
|
||||
if len(sub.sidebar_html) > 20000: return "Sidebar is too big!"
|
||||
|
||||
g.db.add(sub)
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
<div class="w-lg-100">
|
||||
<form id="sidebar" action="/h/{{sub.name}}/sidebar" method="post">
|
||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
<textarea autocomplete="off" maxlength="500" class="form-control rounded" id="bio-text" aria-label="With textarea" placeholder="Enter sidebar here..." rows="10" name="sidebar" form="sidebar">{% if sub.sidebar %}{{sub.sidebar}}{% endif %}</textarea>
|
||||
<textarea autocomplete="off" maxlength="10000" class="form-control rounded" id="bio-text" aria-label="With textarea" placeholder="Enter sidebar here..." rows="10" name="sidebar" form="sidebar">{% if sub.sidebar %}{{sub.sidebar}}{% endif %}</textarea>
|
||||
|
||||
<div class="d-flex mt-2">
|
||||
<input autocomplete="off" class="btn btn-primary ml-auto" type="submit" onclick="disable(this)" value="Save">
|
||||
|
|
|
@ -680,8 +680,8 @@ ALTER SEQUENCE public.submissions_id_seq OWNED BY public.submissions.id;
|
|||
|
||||
CREATE TABLE public.subs (
|
||||
name character varying(20) NOT NULL,
|
||||
sidebar character varying(500),
|
||||
sidebar_html character varying(1000),
|
||||
sidebar character varying(10000),
|
||||
sidebar_html character varying(20000),
|
||||
sidebarurl character varying(60),
|
||||
bannerurl character varying(60),
|
||||
css character varying(4000)
|
||||
|
|
Loading…
Reference in New Issue