summaryrefslogtreecommitdiff
path: root/django/utils/http.py
diff options
context:
space:
mode:
authorLuke Plant <L.Plant.98@cantab.net>2010-09-13 23:01:34 +0000
committerLuke Plant <L.Plant.98@cantab.net>2010-09-13 23:01:34 +0000
commit6fb4f6e2996cf442b614a073f30839419d9db030 (patch)
tree4b7973cb9ae8aecd4b589220ac93a5eb1db6e662 /django/utils/http.py
parent76366aab18a0308f1465feb6236bff9e2907e570 (diff)
Fixed #13765 - 'safe' parameter for urlencode filter
Thanks to KyleMac for the suggestion and SmileyChris for the patch git-svn-id: http://code.djangoproject.com/svn/django/trunk@13849 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils/http.py')
-rw-r--r--django/utils/http.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/utils/http.py b/django/utils/http.py
index f0b1af9c58..610fcbf685 100644
--- a/django/utils/http.py
+++ b/django/utils/http.py
@@ -14,7 +14,7 @@ def urlquote(url, safe='/'):
can safely be used as part of an argument to a subsequent iri_to_uri() call
without double-quoting occurring.
"""
- return force_unicode(urllib.quote(smart_str(url), safe))
+ return force_unicode(urllib.quote(smart_str(url), smart_str(safe)))
urlquote = allow_lazy(urlquote, unicode)
@@ -25,7 +25,7 @@ def urlquote_plus(url, safe=''):
returned string can safely be used as part of an argument to a subsequent
iri_to_uri() call without double-quoting occurring.
"""
- return force_unicode(urllib.quote_plus(smart_str(url), safe))
+ return force_unicode(urllib.quote_plus(smart_str(url), smart_str(safe)))
urlquote_plus = allow_lazy(urlquote_plus, unicode)
def urlencode(query, doseq=0):