summaryrefslogtreecommitdiff
path: root/django/utils/html.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2017-01-11 23:17:25 +0100
committerClaude Paroz <claude@2xlibre.net>2017-01-20 08:44:31 +0100
commitdc8834cad41aa407f402dc54788df3cd37ab3e22 (patch)
treef44864ba7a64c614f00a3d2ad8548ce479e59e1e /django/utils/html.py
parentbf1c9570270b46e9e92b256fb9be394258029bbf (diff)
Refs #23919 -- Removed unneeded force_str calls
Diffstat (limited to 'django/utils/html.py')
-rw-r--r--django/utils/html.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/django/utils/html.py b/django/utils/html.py
index 1fb39bb9b6..63335d74b4 100644
--- a/django/utils/html.py
+++ b/django/utils/html.py
@@ -5,7 +5,7 @@ from urllib.parse import (
parse_qsl, quote, unquote, urlencode, urlsplit, urlunsplit,
)
-from django.utils.encoding import force_str, force_text
+from django.utils.encoding import force_text
from django.utils.functional import keep_lazy, keep_lazy_text
from django.utils.http import RFC3986_GENDELIMS, RFC3986_SUBDELIMS
from django.utils.safestring import SafeData, SafeText, mark_safe
@@ -189,7 +189,7 @@ def strip_spaces_between_tags(value):
def smart_urlquote(url):
"Quotes a URL if it isn't already quoted."
def unquote_quote(segment):
- segment = unquote(force_str(segment))
+ segment = unquote(segment)
# Tilde is part of RFC3986 Unreserved Characters
# http://tools.ietf.org/html/rfc3986#section-2.3
# See also http://bugs.python.org/issue16285
@@ -211,7 +211,7 @@ def smart_urlquote(url):
if query:
# Separately unquoting key/value, so as to not mix querystring separators
# included in query values. See #22267.
- query_parts = [(unquote(force_str(q[0])), unquote(force_str(q[1])))
+ query_parts = [(unquote(q[0]), unquote(q[1]))
for q in parse_qsl(query, keep_blank_values=True)]
# urlencode will take care of quoting
query = urlencode(query_parts)