From 431dd209119b7d896d5a02b3cf85c8785b9e9638 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Fri, 26 Jan 2024 12:12:26 +0100 Subject: [PATCH] =?UTF-8?q?tags=20formation:=20=C3=A9largit=20caract=C3=A8?= =?UTF-8?q?res=20autoris=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/sco_tag_module.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/scodoc/sco_tag_module.py b/app/scodoc/sco_tag_module.py index 7ab9d04a..3c62fd55 100644 --- a/app/scodoc/sco_tag_module.py +++ b/app/scodoc/sco_tag_module.py @@ -106,7 +106,7 @@ class ScoTag(object): """ if not title or len(title) > 32: return False - if re.match(r"^[A-Za-z0-9\-_$!\.]*(:[0-9]*)?$", title): + if re.match(r"^[\w0-9\-_$!?+=,&\.]*(:[0-9]*)?$", title): return True return False @@ -259,6 +259,7 @@ def module_tag_set(module_id="", taglist=None): # Check tags syntax for tag in taglist: if not ScoTag.check_tag_title(tag): + log(f"module_tag_set({module_id}): invalid tag title") return scu.json_error(404, "invalid tag") # TODO code à moderniser (+ revoir classe ScoTag, utiliser modèle)