From 33ba88b10b8ed2b1747090024b03130d3374d07d Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 5 Jun 2022 11:46:27 +0100 Subject: [PATCH] Show blocks as a sorted list --- webapp_moderation.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/webapp_moderation.py b/webapp_moderation.py index 5db54848b..1af0f315a 100644 --- a/webapp_moderation.py +++ b/webapp_moderation.py @@ -395,7 +395,11 @@ def html_moderation_info(css_cache: {}, translate: {}, blocking_filename = base_dir + '/accounts/blocking.txt' if os.path.isfile(blocking_filename): with open(blocking_filename, 'r') as fp_block: - blocked_str = fp_block.read() + blocked_lines = fp_block.readlines().sort() + blocked_str = '' + for line in blocked_lines: + line = line.replace('\n', '').replace('\r', '').strip() + blocked_str += line + '\n' info_form += '
\n' info_form += \ '
' + \