We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8b6a71c commit 71a9ffaCopy full SHA for 71a9ffa
1 file changed
ietf/utils/text.py
@@ -11,6 +11,7 @@
11
12
import debug # pyflakes:ignore
13
14
+@keep_lazy(six.text_type)
15
def xslugify(value):
16
"""
17
Converts to ASCII. Converts spaces to hyphens. Removes characters that
@@ -21,7 +22,6 @@ def xslugify(value):
21
22
value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore').decode('ascii')
23
value = re.sub('[^\w\s/-]', '', value).strip().lower()
24
return mark_safe(re.sub('[-\s/]+', '-', value))
-xslugify = keep_lazy(xslugify, six.text_type)
25
26
def strip_prefix(text, prefix):
27
if text.startswith(prefix):
0 commit comments