mirror of
https://github.com/django/django.git
synced 2025-10-25 22:56:12 +00:00
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.
This commit is contained in:
@@ -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():
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user