Index: django/utils/text.py
===================================================================
--- django/utils/text.py	(revision 9726)
+++ django/utils/text.py	(working copy)
@@ -197,7 +197,7 @@
     return str(ustring_re.sub(fix, s))
 javascript_quote = allow_lazy(javascript_quote, unicode)
 
-smart_split_re = re.compile('("(?:[^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'(?:[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\'|[^\\s]+)')
+smart_split_re = re.compile('[^\\s"\'\\\\]*("(?:[^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'(?:[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\'|[^\\s]+)')
 def smart_split(text):
     r"""
     Generator that splits a string by spaces, leaving quoted phrases together.
@@ -211,6 +211,14 @@
     [u'Another', u"'person's'", u'test.']
     >>> list(smart_split(r'A "\"funky\" style" test.')) 
     [u'A', u'""funky" style"', u'test.']
+    >>> list(smart_split(r"A variable='value' should work."))
+    [u'A', u"variable='value'", u'should', u'work.']
+    >>> list(smart_split(r"A variable='value with spaces' should also work."))
+    [u'A', u"variable='value with spaces'", u'should', u'also', u'work.']
+    >>> list(smart_split(r'A variable="value with spaces" should also work.'))
+    [u'A', u'variable="value with spaces"', u'should', u'also', u'work.']
+    >>> list(smart_split(r'A variable="value with spaces and \'escaped quotes\'" should also work.'))
+    [u'A', u'variable="value with spaces and \\\'escaped quotes\\\'"', u'should', u'also', u'work.']
     """
     text = force_unicode(text)
     for bit in smart_split_re.finditer(text):
Index: tests/regressiontests/text/tests.py
===================================================================
--- tests/regressiontests/text/tests.py	(revision 9726)
+++ tests/regressiontests/text/tests.py	(working copy)
@@ -15,6 +15,14 @@
 [u'"a', u"'one"]
 >>> print list(smart_split(r'''all friends' tests'''))[1]
 friends'
+>>> list(smart_split(r"A variable='value' should work."))
+[u'A', u"variable='value'", u'should', u'work.']
+>>> list(smart_split(r"A variable='value with spaces' should also work."))
+[u'A', u"variable='value with spaces'", u'should', u'also', u'work.']
+>>> list(smart_split(r'A variable="value with spaces" should also work.'))
+[u'A', u'variable="value with spaces"', u'should', u'also', u'work.']
+>>> list(smart_split(r'A variable="value with spaces and \'escaped quotes\'" should also work.'))
+[u'A', u'variable="value with spaces and \\\'escaped quotes\\\'"', u'should', u'also', u'work.']
 
 ### urlquote #############################################################
 >>> from django.utils.http import urlquote, urlquote_plus
