Update utils.py
This commit is contained in:
parent
fff17469e0
commit
bbab84bf5b
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user