#12119 closed (fixed)
django.utils.text.smart_split() does not handle multiple quoted strings joined by non-whitespace characters properly
| Reported by: | Johannes Dollinger | Owned by: | nobody |
|---|---|---|---|
| Component: | Template system | Version: | 1.1 |
| Severity: | Keywords: | ||
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
>>> from django.utils.text import smart_split >>> list(smart_split("cut:','|cut:' '")) [u"cut:','|cut:'", u"'"]
This is not a duplicate of #8902 or #10001 (as those have been fixed in r10462).
It might be considered a duplicate of #6271, but the scope of that ticket is "fix all template tags" while this ticket should just be about a particular smart_split() bug.
I'll attach a patch that only modifies the regexp.
Attachments (1)
Change History (6)
by , 16 years ago
| Attachment: | 12119.smart_split_with_space.diff added |
|---|
comment:1 by , 16 years ago
| milestone: | → 1.2 |
|---|---|
| Triage Stage: | Unreviewed → Accepted |
comment:2 by , 16 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
comment:3 by , 16 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
comment:4 by , 16 years ago
Note:
See TracTickets
for help on using tickets.
(In [12581]) Fixed #12119. Changed smart_split to stop splitting on whitespace in quotes. Thanks, emulbreh.