diff --git a/files/helpers/config/const.py b/files/helpers/config/const.py index b2cc2a340..2f8d7eadf 100644 --- a/files/helpers/config/const.py +++ b/files/helpers/config/const.py @@ -443,6 +443,8 @@ POST_SORTS = COMMENT_SORTS | { } COMMENT_SORTS = COMMENT_SORTS | {"saves": "save"} +USER_SNAPPY_QUOTES_LENGTH = 1000 + ################################################################################ ### COLUMN INFO ################################################################################ @@ -450,7 +452,7 @@ COMMENT_SORTS = COMMENT_SORTS | {"saves": "save"} HOLE_NAME_COLUMN_LENGTH = 25 HOLE_SIDEBAR_COLUMN_LENGTH = 10000 HOLE_SIDEBAR_HTML_COLUMN_LENGTH = 20000 -CUSTOM_SNAPPY_QUOTES_LENGTH = 20000 +HOLE_SNAPPY_QUOTES_LENGTH = 50000 HOLE_SIDEBAR_URL_COLUMN_LENGTH = 60 HOLE_BANNER_URL_COLUMN_LENGTH = 60 HOLE_MARSEY_URL_LENGTH = 60 diff --git a/files/routes/holes.py b/files/routes/holes.py index cdbb26d3d..b72d51236 100644 --- a/files/routes/holes.py +++ b/files/routes/holes.py @@ -953,8 +953,8 @@ def post_hole_snappy_quotes(v, hole): if snappy_quotes.endswith('[para]'): snappy_quotes = snappy_quotes[:-6].strip() - if len(snappy_quotes) > CUSTOM_SNAPPY_QUOTES_LENGTH: - abort(400, f"Quotes are too long (max {CUSTOM_SNAPPY_QUOTES_LENGTH} characters)") + if len(snappy_quotes) > HOLE_SNAPPY_QUOTES_LENGTH: + abort(400, f"Quotes are too long (max {HOLE_SNAPPY_QUOTES_LENGTH} characters)") hole.snappy_quotes = snappy_quotes g.db.add(hole) diff --git a/files/routes/jinja2.py b/files/routes/jinja2.py index 5a7301320..c5ecc645c 100644 --- a/files/routes/jinja2.py +++ b/files/routes/jinja2.py @@ -206,6 +206,5 @@ def inject_constants(): "CURSORMARSEY_DEFAULT":CURSORMARSEY_DEFAULT, "SNAPPY_ID":SNAPPY_ID, "ZOZBOT_ID":ZOZBOT_ID, "get_running_orgy":get_running_orgy, "bar_position":bar_position, "datetime":datetime, "CSS_LENGTH_LIMIT":CSS_LENGTH_LIMIT, "cache":cache, "emoji_count":emoji_count, "group_count":group_count, "user_count":user_count, - "HOLE_SIDEBAR_COLUMN_LENGTH":HOLE_SIDEBAR_COLUMN_LENGTH, "CUSTOM_SNAPPY_QUOTES_LENGTH":CUSTOM_SNAPPY_QUOTES_LENGTH, - "top_poster_of_the_day":top_poster_of_the_day, + "HOLE_SIDEBAR_COLUMN_LENGTH":HOLE_SIDEBAR_COLUMN_LENGTH, "HOLE_SNAPPY_QUOTES_LENGTH":HOLE_SNAPPY_QUOTES_LENGTH, "USER_SNAPPY_QUOTES_LENGTH":USER_SNAPPY_QUOTES_LENGTH, "top_poster_of_the_day":top_poster_of_the_day, } diff --git a/files/routes/settings.py b/files/routes/settings.py index cb1f8be18..f097588e1 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -457,8 +457,8 @@ def snappy_quotes(v): if snappy_quotes == v.snappy_quotes: abort(400, "You didn't change anything!") - if len(snappy_quotes) > CUSTOM_SNAPPY_QUOTES_LENGTH: - abort(400, f"Quotes are too long (max {CUSTOM_SNAPPY_QUOTES_LENGTH} characters)") + if len(snappy_quotes) > USER_SNAPPY_QUOTES_LENGTH: + abort(400, f"Quotes are too long (max {USER_SNAPPY_QUOTES_LENGTH} characters)") if not snappy_quotes: snappy_quotes = None diff --git a/files/templates/hole/settings.html b/files/templates/hole/settings.html index a572f5ce0..cbd1ec04f 100644 --- a/files/templates/hole/settings.html +++ b/files/templates/hole/settings.html @@ -84,9 +84,9 @@