mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #3155 -- Allow an integer to be passed to the urlencode filter. Patch
based on one from SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4496 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -141,6 +141,8 @@ def upper(value):
|
||||
def urlencode(value):
|
||||
"Escapes a value for use in a URL"
|
||||
import urllib
|
||||
if not isinstance(value, basestring):
|
||||
value = str(value)
|
||||
return urllib.quote(value)
|
||||
|
||||
def urlize(value):
|
||||
|
||||
Reference in New Issue
Block a user