From 71a9ffafc5c084d01ddc518a7e28d557db132535 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Thu, 22 Feb 2018 00:13:32 +0000 Subject: [PATCH] Changed allow_lazy to the @keep_lazy decorator. - Legacy-Id: 14674 --- ietf/utils/text.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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):