Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#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: UI/UX:

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)

12119.smart_split_with_space.diff (1.2 KB) - added by Johannes Dollinger 7 years ago.

Download all attachments as: .zip

Change History (6)

Changed 7 years ago by Johannes Dollinger

comment:1 Changed 7 years ago by Russell Keith-Magee

milestone: 1.2
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

comment:2 Changed 7 years ago by Alex Gaynor

Triage Stage: AcceptedReady for checkin

comment:3 Changed 7 years ago by jkocherhans

Resolution: fixed
Status: newclosed

(In [12581]) Fixed #12119. Changed smart_split to stop splitting on whitespace in quotes. Thanks, emulbreh.

comment:4 Changed 7 years ago by jkocherhans

(In [12582]) [1.1.X] Fixed #12119. Changed smart_split to stop splitting on whitespace in quotes. Backport of r12581 from trunk.

comment:5 Changed 5 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

Note: See TracTickets for help on using tickets.
Back to Top