Index: django/utils/text.py
===================================================================
--- django/utils/text.py	(revision 10176)
+++ django/utils/text.py	(working copy)
@@ -197,7 +197,10 @@
     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(r"""([^\s"]*"(?:[^"\\]*(?:\\.[^"\\]*)*)"\S*| # matches '"value with spaces"' and 'anything_before="value with spaces"'
+                                 [^\s']*'(?:[^'\\]*(?:\\.[^'\\]*)*)'\S*| # same as above but with quotes swapped
+                                 \S+)                                 # matches not whitespaces""",
+                            re.VERBOSE)
 def smart_split(text):
     r"""
     Generator that splits a string by spaces, leaving quoted phrases together.
@@ -206,6 +209,8 @@
     quote marks and escaped quotes will remain escaped (the results can then
     be further processed with unescape_string_literal()).
 
+    (See more doctests at tests/regressiontests/text/tests.py)
+
     >>> list(smart_split(r'This is "a person\'s" test.'))
     [u'This', u'is', u'"a person\\\'s"', u'test.']
     >>> list(smart_split(r"Another 'person\'s' test."))
Index: django/template/__init__.py
===================================================================
--- django/template/__init__.py	(revision 10176)
+++ django/template/__init__.py	(working copy)
@@ -199,19 +199,7 @@
             self.contents[:20].replace('\n', ''))
 
     def split_contents(self):
-        split = []
-        bits = iter(smart_split(self.contents))
-        for bit in bits:
-            # Handle translation-marked template pieces
-            if bit.startswith('_("') or bit.startswith("_('"):
-                sentinal = bit[2] + ')'
-                trans_bit = [bit]
-                while not bit.endswith(sentinal):
-                    bit = bits.next()
-                    trans_bit.append(bit)
-                bit = ' '.join(trans_bit)
-            split.append(bit)
-        return split
+        return list(smart_split(self.contents))
 
 class Lexer(object):
     def __init__(self, template_string, origin):
@@ -480,8 +468,7 @@
     'arg_sep': re.escape(FILTER_ARGUMENT_SEPARATOR),
   }
 
-filter_raw_string = filter_raw_string.replace("\n", "").replace(" ", "")
-filter_re = re.compile(filter_raw_string, re.UNICODE)
+filter_re = re.compile(filter_raw_string, re.UNICODE | re.VERBOSE)
 
 class FilterExpression(object):
     r"""
Index: django/template/defaulttags.py
===================================================================
--- django/template/defaulttags.py	(revision 10176)
+++ django/template/defaulttags.py	(working copy)
@@ -1092,7 +1092,7 @@
 
     The URL will look like ``/clients/client/123/``.
     """
-    bits = token.contents.split(' ')
+    bits = token.split_contents()
     if len(bits) < 2:
         raise TemplateSyntaxError("'%s' takes at least one argument"
                                   " (path to a view)" % bits[0])
Index: tests/regressiontests/text/tests.py
===================================================================
--- tests/regressiontests/text/tests.py	(revision 10176)
+++ tests/regressiontests/text/tests.py	(working copy)
@@ -15,6 +15,24 @@
 [u'"a', u"'one"]
 >>> print list(smart_split(r'''all friends' tests'''))[1]
 friends'
+>>> list(smart_split(u'url search_page words="something else"'))
+[u'url', u'search_page', u'words="something else"']
+>>> list(smart_split(u"url search_page words='something else'"))
+[u'url', u'search_page', u"words='something else'"]
+>>> list(smart_split(u'url search_page words "something else"'))
+[u'url', u'search_page', u'words', u'"something else"']
+>>> list(smart_split(u'url search_page words-"something else"'))
+[u'url', u'search_page', u'words-"something else"']
+>>> list(smart_split(u'url search_page words=hello'))
+[u'url', u'search_page', u'words=hello']
+>>> list(smart_split(u'url search_page words="something else'))
+[u'url', u'search_page', u'words="something', u'else']
+>>> list(smart_split(u"cycle 'a' 'b' 'c' as abc"))
+[u'cycle', u"'a'", u"'b'", u"'c'", u'as', u'abc']
+>>> list(smart_split(u'cycle "a" "b" "c" as abc'))
+[u'cycle', u'"a"', u'"b"', u'"c"', u'as', u'abc']
+>>> list(smart_split(u'cycle "a" "b" "c" "d" as abc'))
+[u'cycle', u'"a"', u'"b"', u'"c"', u'"d"', u'as', u'abc']
 
 ### urlquote #############################################################
 >>> from django.utils.http import urlquote, urlquote_plus
