|
@@ -435,6 +435,8 @@ class Site(object): |
|
|
.replace(os.sep, '/').encode("utf-8") |
|
|
.replace(os.sep, '/').encode("utf-8") |
|
|
if safe is not None: |
|
|
if safe is not None: |
|
|
return quote(fpath, safe) |
|
|
return quote(fpath, safe) |
|
|
|
|
|
elif self.config.encode_safe is not None: |
|
|
|
|
|
return quote(fpath, self.config.encode_safe) |
|
|
else: |
|
|
else: |
|
|
return quote(fpath) |
|
|
return quote(fpath) |
|
|
|
|
|
|
|
@@ -448,6 +450,8 @@ class Site(object): |
|
|
.replace(os.sep, '/').encode("utf-8") |
|
|
.replace(os.sep, '/').encode("utf-8") |
|
|
if safe is not None: |
|
|
if safe is not None: |
|
|
return quote(fpath, safe) |
|
|
return quote(fpath, safe) |
|
|
|
|
|
elif self.config.encode_safe is not None: |
|
|
|
|
|
return quote(fpath, self.config.encode_safe) |
|
|
else: |
|
|
else: |
|
|
return quote(fpath) |
|
|
return quote(fpath) |
|
|
|
|
|
|
|
@@ -457,6 +461,9 @@ class Site(object): |
|
|
configuration and returns the appropriate url. The return value |
|
|
configuration and returns the appropriate url. The return value |
|
|
is url encoded. |
|
|
is url encoded. |
|
|
""" |
|
|
""" |
|
|
|
|
|
if safe is None and self.config.encode_safe is not None: |
|
|
|
|
|
safe = self.config.encode_safe |
|
|
|
|
|
|
|
|
if urlparse.urlparse(path)[:2] != ("",""): |
|
|
if urlparse.urlparse(path)[:2] != ("",""): |
|
|
return path |
|
|
return path |
|
|
if self.is_media(path): |
|
|
if self.is_media(path): |
|
|