Make django.utils.text.slugify() strip dashes and underscores
Bug generation slug
Example:
from django.utils import text
text.slugify("___This is a test ---")
output: ___this-is-a-test-
Improvement after correction
from django.utils import text
text.slugify("___This is a test ---")
output: this-is-a-test
PR
Change History
(10)
Description: |
modified (diff)
|
Owner: |
changed from nobody to Elinaldo do Nascimento Monteiro
|
Status: |
new → assigned
|
Description: |
modified (diff)
|
Summary: |
django.utils.text.slugify Django slugify correction → Make django.utils.text.slugify() remove redundant dashes and underscores
|
Triage Stage: |
Unreviewed → Accepted
|
Type: |
New feature → Cleanup/optimization
|
Patch needs improvement: |
set
|
Owner: |
changed from Elinaldo do Nascimento Monteiro to David Smith
|
Patch needs improvement: |
unset
|
Patch needs improvement: |
set
|
Patch needs improvement: |
unset
|
Summary: |
Make django.utils.text.slugify() remove redundant dashes and underscores → Make django.utils.text.slugify() strip dashes and underscores
|
Triage Stage: |
Accepted → Ready for checkin
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
The current version of the patch converts all underscores to dashes which (as discussed on the PR) isn't an obviously desired change. A discussion is needed to see if there's consensus about that change.