diff options
| author | David Hoffman <dhoffman34@icloud.com> | 2014-10-13 18:15:36 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-10-30 09:08:01 -0400 |
| commit | d9bb7128fe7bc565a2dbbd1e89bb0345711b46f6 (patch) | |
| tree | e094c1cbf0aeb57d754acf33120ee91bb45f30c7 /django/utils | |
| parent | cb952099f4aeac263501c185441872af06927606 (diff) | |
[1.7.x] Fixed #23558 -- documented slugify limitations
Backport of 03467368db from master
Diffstat (limited to 'django/utils')
| -rw-r--r-- | django/utils/text.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/django/utils/text.py b/django/utils/text.py index df6e1d0c46..34535d6455 100644 --- a/django/utils/text.py +++ b/django/utils/text.py @@ -435,9 +435,9 @@ unescape_string_literal = allow_lazy(unescape_string_literal) def slugify(value): """ - Converts to lowercase, removes non-word characters (alphanumerics and - underscores) and converts spaces to hyphens. Also strips leading and - trailing whitespace. + Converts to ASCII. Converts spaces to hyphens. Removes characters that + aren't alphanumerics, underscores, or hyphens. Converts to lowercase. + Also strips leading and trailing whitespace. """ value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore').decode('ascii') value = re.sub('[^\w\s-]', '', value).strip().lower() |
