From 8dd2ffc8d7457460eaf0b351ba9ac652d25170fc Mon Sep 17 00:00:00 2001 From: Samuel Gaist <samuel.gaist@idiap.ch> Date: Thu, 26 Apr 2018 15:08:00 +0200 Subject: [PATCH] [common][model] Ensure sanitizer works on unicode string too --- beat/web/common/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beat/web/common/models.py b/beat/web/common/models.py index e28a45321..9b1b9044b 100755 --- a/beat/web/common/models.py +++ b/beat/web/common/models.py @@ -389,7 +389,7 @@ class Versionable(Shareable): @staticmethod def sanitize_name(name): """Makes sure that the name is valid""" - return re.sub(r'[\W]', '-', name) + return re.sub(r'[^\x00-\x7f]|\W', r'-', name) -- GitLab