﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
1127	ifequal template tag does not accept hardcoded strings containing spaces	elcio@…	Adrian Holovaty	"This works:
{{{
{% ifequal test ""test"" %}
    foo...
{% endifequal %}
}}}

This not:
{{{
{% ifequal test ""test 2"" %}
    foo...
{% endifequal %}
}}}

Suggested patch:
{{{
django/trunk/django/core/defaulttags.py
===================================================================
--- defaulttags.py      (revision 1782)
+++ defaulttags.py      (workcopy)
@@ -479,7 +479,16 @@
             ...
         {% endifnotequal %}
     """"""
-    bits = token.contents.split()
+    tmpbits = token.contents.split()
+    bits=[]
+    sep=""""
+    for i in tmpbits:
+       if(sep):
+           bits[-1]+="" ""+i
+           if(i[-1]==sep):sep=""""
+       else:
+           bits.append(i)
+           if(i[0]==""'"" or i[0]=='""'):sep=i
     if len(bits) != 3:
         raise TemplateSyntaxError, ""%r takes two arguments"" % bits[0]
     end_tag = 'end' + bits[0]
}}}

I'm afraid this is not an elegant solution. I think it must to be done in other template tags that uses token.contents.split() and are supposed to accept hardcoded strings. I think django/trunk/tests/othertests/templates.py must be also changed.
"	defect	closed	Template system	dev	normal	duplicate			Unreviewed	0	0	0	0	0	0
