summaryrefslogtreecommitdiff
path: root/django/utils/encoding.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2013-03-22 17:55:12 +0100
committerClaude Paroz <claude@2xlibre.net>2013-03-22 17:55:12 +0100
commit164528acc8752f33a3af4c1255b24702a4c81240 (patch)
treebd377a43c36fcd00b8e98d66deb7605650d93492 /django/utils/encoding.py
parent829dc3c5a64d3fa203b8cc0055e83cf23addfee3 (diff)
Fixed #20108 -- Fixed filepath_to_uri decoding error
This was a regression due to unicode_literals usage. Thanks Ivan Virabyan for the report and the initial patch.
Diffstat (limited to 'django/utils/encoding.py')
-rw-r--r--django/utils/encoding.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/encoding.py b/django/utils/encoding.py
index efc4eccaf9..adab0d0712 100644
--- a/django/utils/encoding.py
+++ b/django/utils/encoding.py
@@ -234,7 +234,7 @@ def filepath_to_uri(path):
return path
# I know about `os.sep` and `os.altsep` but I want to leave
# some flexibility for hardcoding separators.
- return quote(force_bytes(path.replace("\\", "/")), safe=b"/~!*()'")
+ return quote(force_bytes(path).replace(b"\\", b"/"), safe=b"/~!*()'")
def get_system_encoding():
"""