From bbab84bf5bdd2bebc202b9d6ba64dae9cfd25c6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=92riks=20Karls?= Date: Mon, 26 Aug 2019 22:42:06 +0300 Subject: [PATCH] Update utils.py --- erepublik/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erepublik/utils.py b/erepublik/utils.py index a748c7b..46d1a92 100644 --- a/erepublik/utils.py +++ b/erepublik/utils.py @@ -330,5 +330,5 @@ def slugify(value, allow_unicode=False) -> str: value = unicodedata.normalize('NFKC', value) else: value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore').decode('ascii') - value = re.sub(r'[^\w\s-]', '', value).strip().lower() + value = re.sub(r'[^\w\s-]', '_', value).strip().lower() return re.sub(r'[-\s]+', '-', value)