Get moderation text first

main
Bob Mottram 2022-04-10 12:16:52 +01:00
parent 0517d034a0
commit 3ed59c88a6
1 changed files with 3 additions and 0 deletions

View File

@ -2186,6 +2186,7 @@ class PubServer(BaseHTTPRequestHandler):
if '&' in moderation_params: if '&' in moderation_params:
moderation_text = None moderation_text = None
moderation_button = None moderation_button = None
# get the moderation text first
for moderation_str in moderation_params.split('&'): for moderation_str in moderation_params.split('&'):
if moderation_str.startswith('moderationAction'): if moderation_str.startswith('moderationAction'):
if '=' in moderation_str: if '=' in moderation_str:
@ -2194,6 +2195,8 @@ class PubServer(BaseHTTPRequestHandler):
mod_text = moderation_text.replace('+', ' ') mod_text = moderation_text.replace('+', ' ')
moderation_text = \ moderation_text = \
urllib.parse.unquote_plus(mod_text.strip()) urllib.parse.unquote_plus(mod_text.strip())
# which button was pressed?
for moderation_str in moderation_params.split('&'):
if moderation_str.startswith('submitInfo'): if moderation_str.startswith('submitInfo'):
if '=' in moderation_str: if '=' in moderation_str:
moderation_text = \ moderation_text = \