forked from ScoDoc/ScoDoc
tags formation: élargit caractères autorisés
This commit is contained in:
parent
4985182b9a
commit
431dd20911
@ -106,7 +106,7 @@ class ScoTag(object):
|
|||||||
"""
|
"""
|
||||||
if not title or len(title) > 32:
|
if not title or len(title) > 32:
|
||||||
return False
|
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 True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@ -259,6 +259,7 @@ def module_tag_set(module_id="", taglist=None):
|
|||||||
# Check tags syntax
|
# Check tags syntax
|
||||||
for tag in taglist:
|
for tag in taglist:
|
||||||
if not ScoTag.check_tag_title(tag):
|
if not ScoTag.check_tag_title(tag):
|
||||||
|
log(f"module_tag_set({module_id}): invalid tag title")
|
||||||
return scu.json_error(404, "invalid tag")
|
return scu.json_error(404, "invalid tag")
|
||||||
|
|
||||||
# TODO code à moderniser (+ revoir classe ScoTag, utiliser modèle)
|
# TODO code à moderniser (+ revoir classe ScoTag, utiliser modèle)
|
||||||
|
Loading…
Reference in New Issue
Block a user