diff options
Diffstat (limited to 'django')
| -rw-r--r-- | django/contrib/staticfiles/storage.py | 4 | ||||
| -rw-r--r-- | django/utils/encoding.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/django/contrib/staticfiles/storage.py b/django/contrib/staticfiles/storage.py index 3b431edf94..1c841e9889 100644 --- a/django/contrib/staticfiles/storage.py +++ b/django/contrib/staticfiles/storage.py @@ -51,8 +51,8 @@ class CachedFilesMixin(object): default_template = """url("%s")""" patterns = ( ("*.css", ( - br"""(url\(['"]{0,1}\s*(.*?)["']{0,1}\))""", - (br"""(@import\s*["']\s*(.*?)["'])""", """@import url("%s")"""), + r"""(url\(['"]{0,1}\s*(.*?)["']{0,1}\))""", + (r"""(@import\s*["']\s*(.*?)["'])""", """@import url("%s")"""), )), ) diff --git a/django/utils/encoding.py b/django/utils/encoding.py index 633022dd3b..7b80f13496 100644 --- a/django/utils/encoding.py +++ b/django/utils/encoding.py @@ -225,7 +225,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(smart_bytes(path).replace("\\", "/"), safe=b"/~!*()'") + return quote(smart_bytes(path.replace("\\", "/")), safe=b"/~!*()'") # The encoding of the default system locale but falls back to the # given fallback encoding if the encoding is unsupported by python or could |
