diff --git a/files/helpers/const.py b/files/helpers/const.py index 0697f1fe9..00eba309b 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -619,6 +619,8 @@ elif SITE == 'watchpeopledie.tv': PERMS['POST_EDITING'] = 2 PERMS['ADMIN_ADD'] = 4 + POLL_MAX_OPTIONS = 0 + ERROR_TITLES.update({ 400: "Bad Request", 401: "Unauthorized", diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 820abc771..fa4072a45 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -499,7 +499,7 @@ def validate_css(css): def sanitize_poll_options(v:User, body:str, allow_bets:bool) -> tuple[str, List[Any], List[Any], List[Any]]: def sanitize_poll_type(body:str, re:re.Pattern) -> tuple[str, List[str]]: opts = [] - for i in list(re.finditer(body))[:POLL_MAX_OPTIONS]: + for i in list(re.finditer(body))[:POLL_MAX_OPTIONS] if POLL_MAX_OPTIONS else list(re.finditer(body)): opts.append(filter_emojis_only(i.group(1))) body = body.replace(i.group(0), "") return (body, opts)