﻿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
12140	urlencode empty list encoding bug & fix	aneil	nobody	"`django.utils.http.urlencode` doesn't behave the same as urllib.urlencode for empty lists:

`urllib.urlencode({'foo':[]},True) => ''`

`django.utils.http.urlencode({'foo':[]},True) => 'foo=%5B%5D'`

The attached diff has a change at line 557 in trunk/django/utils/http.py:
{{{
-         isinstance(v, (list,tuple)) and [smart_str(i) for i in v] or smart_str(v))
+         [smart_str(i) for i in v] if isinstance(v, (list,tuple)) else smart_str(v))
}}}

Attached.
"	Bug	closed	HTTP handling	dev	Normal	fixed	urlencode		Accepted	1	0	0	0	0	0
