From 24fe0aba30ca355e631f321fa6783d4c23507ed3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lera=20Elvo=C3=A9?= Date: Tue, 2 Dec 2025 06:23:06 +0300 Subject: [PATCH] use MOTD_BANNED_TAGS in motd editor view --- app/__init__.py | 3 ++- app/constants.py | 2 +- app/templates/mod/motd.html | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/__init__.py b/app/__init__.py index b54a62e..2bd6469 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -7,7 +7,7 @@ from .routes.threads import get_post_url from .constants import ( PermissionLevel, permission_level_string, InfoboxKind, InfoboxHTMLClass, - REACTION_EMOJI, + REACTION_EMOJI, MOTD_BANNED_TAGS, ) from .lib.babycode import babycode_to_html, EMOJI, BABYCODE_VERSION from datetime import datetime @@ -176,6 +176,7 @@ def create_app(): "__commit": commit, "__emoji": EMOJI, "REACTION_EMOJI": REACTION_EMOJI, + "MOTD_BANNED_TAGS": MOTD_BANNED_TAGS, } @app.context_processor diff --git a/app/constants.py b/app/constants.py index e2f2081..1cdab44 100644 --- a/app/constants.py +++ b/app/constants.py @@ -48,7 +48,7 @@ REACTION_EMOJI = [ ] MOTD_BANNED_TAGS = [ - 'img', 'spoiler', 'mention' + 'img', 'spoiler', '@mention' ] def permission_level_string(perm): diff --git a/app/templates/mod/motd.html b/app/templates/mod/motd.html index 8f45ee2..7d7501c 100644 --- a/app/templates/mod/motd.html +++ b/app/templates/mod/motd.html @@ -9,7 +9,7 @@
- {{ babycode_editor_component('body', ta_placeholder='MOTD body (required)', banned_tags=['img', 'spoiler', '@mention'], prefill=current.body_original_markup) }} + {{ babycode_editor_component('body', ta_placeholder='MOTD body (required)', banned_tags=MOTD_BANNED_TAGS, prefill=current.body_original_markup) }}