diff --git a/django/utils/text.py b/django/utils/text.py index fb5f6298c4..cb39110b83 100644 --- a/django/utils/text.py +++ b/django/utils/text.py @@ -393,9 +393,10 @@ def unescape_string_literal(s): @keep_lazy_text def slugify(value, allow_unicode=False): """ - Convert to ASCII if 'allow_unicode' is False. Convert spaces to hyphens. - Remove characters that aren't alphanumerics, underscores, or hyphens. - Convert to lowercase. Also strip leading and trailing whitespace. + Convert to ASCII if 'allow_unicode' is False. Convert spaces or repeated + dashes to single dashes. Remove characters that aren't alphanumerics, + underscores, or hyphens. Convert to lowercase. Also strip leading and + trailing whitespace. """ value = str(value) if allow_unicode: