diff --git a/ietf/utils/text.py b/ietf/utils/text.py index c929843c5..ad1cd1c3c 100644 --- a/ietf/utils/text.py +++ b/ietf/utils/text.py @@ -11,6 +11,7 @@ from django.utils.safestring import mark_safe import debug # pyflakes:ignore +@keep_lazy(six.text_type) def xslugify(value): """ Converts to ASCII. Converts spaces to hyphens. Removes characters that @@ -21,7 +22,6 @@ def xslugify(value): value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore').decode('ascii') value = re.sub('[^\w\s/-]', '', value).strip().lower() return mark_safe(re.sub('[-\s/]+', '-', value)) -xslugify = keep_lazy(xslugify, six.text_type) def strip_prefix(text, prefix): if text.startswith(prefix):