From 48d9a3ec8a06a6157431f8e80c8b188af220c829 Mon Sep 17 00:00:00 2001 From: cjwaian Date: Tue, 20 Mar 2018 16:54:30 -0700 Subject: [PATCH] Remove non-ASCII character (#1104) --- lemur/common/defaults.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lemur/common/defaults.py b/lemur/common/defaults.py index bb49c5b7..3eba7be0 100644 --- a/lemur/common/defaults.py +++ b/lemur/common/defaults.py @@ -10,7 +10,7 @@ from lemur.constants import SAN_NAMING_TEMPLATE, DEFAULT_NAMING_TEMPLATE def text_to_slug(value): """Normalize a string to a "slug" value, stripping character accents and removing non-alphanum characters.""" - # Strip all character accents (รค => a): decompose Unicode characters and then drop combining chars. + # Strip all character accents: decompose Unicode characters and then drop combining chars. value = ''.join(c for c in unicodedata.normalize('NFKD', value) if not unicodedata.combining(c)) # Replace all remaining non-alphanumeric characters with '-'. Multiple characters get collapsed into a single dash.