Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #3543 -- Be a bit more tolerant of spaces following the comma

argument separator in the "url" tag.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@5077 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit aa1b182da33c6ea4f79c28abd5cc1b7c1733ce25 1 parent b3e0b59
Malcolm Tredinnick authored April 25, 2007
1  django/template/defaulttags.py
@@ -956,6 +956,7 @@ def url(parser, token):
956 956
         for arg in bits[2].split(','):
957 957
             if '=' in arg:
958 958
                 k, v = arg.split('=', 1)
  959
+                k = k.strip()
959 960
                 kwargs[k] = parser.compile_filter(v)
960 961
             else:
961 962
                 args.append(parser.compile_filter(arg))
2  tests/regressiontests/templates/tests.py
@@ -694,7 +694,7 @@ def test_templates(self):
694 694
             ### URL TAG ########################################################
695 695
             # Successes
696 696
             'url01' : ('{% url regressiontests.templates.views.client client.id %}', {'client': {'id': 1}}, '/url_tag/client/1/'),
697  
-            'url02' : ('{% url regressiontests.templates.views.client_action client.id,action="update" %}', {'client': {'id': 1}}, '/url_tag/client/1/update/'),
  697
+            'url02' : ('{% url regressiontests.templates.views.client_action client.id, action="update" %}', {'client': {'id': 1}}, '/url_tag/client/1/update/'),
698 698
             'url03' : ('{% url regressiontests.templates.views.index %}', {}, '/url_tag/'),
699 699
             'url04' : ('{% url named-client client.id %}', {'client': {'id': 1}}, '/url_tag/named-client/1/'),
700 700
 

0 notes on commit aa1b182

Please sign in to comment.
Something went wrong with that request. Please try again.