diff --git a/auquotidien/modules/root.py b/auquotidien/modules/root.py index 46ac7ef..1529824 100644 --- a/auquotidien/modules/root.py +++ b/auquotidien/modules/root.py @@ -272,7 +272,7 @@ class AlternateRootDirectory(OldRootDirectory): if not uri_rest: # REQUEST_URI doesn't exist when using internal HTTP server # (--http) - uri_rest = get_request().get_path() + uri_rest = urllib.parse.quote(get_request().get_path()) if get_request().get_query(): uri_rest += '?' + get_request().get_query() if uri_rest.startswith(base_url): @@ -280,9 +280,6 @@ class AlternateRootDirectory(OldRootDirectory): if f.category: if f.category.url_name == f.url_name: return FormsRootDirectory(f.category)._q_traverse(path[1:]) - scheme, netloc, path, params, query, fragment = urllib.parse.urlparse(uri_rest) - path = urllib.parse.quote(path) - uri_rest = urllib.parse.urlunparse((scheme, netloc, path, params, query, fragment)) return redirect('%s%s/%s' % (base_url, f.category.url_name, uri_rest)) try: