diff piecrust/routing.py @ 568:6b6c5442c790

bug: Correctly handle root URLs with special characters. The `site/root` setting is now pre-escaped to get a correct URL, and routing excludes it from escaping. Add unit tests.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 13 Oct 2015 22:50:38 -0700
parents 624559e72d3b
children 2f780b191541
line wrap: on
line diff
--- a/piecrust/routing.py	Tue Oct 13 22:46:05 2015 -0700
+++ b/piecrust/routing.py	Tue Oct 13 22:50:38 2015 -0700
@@ -227,7 +227,7 @@
                 else:
                     uri = base_uri + ext
 
-        uri = urllib.parse.quote(self.uri_root + uri)
+        uri = self.uri_root + urllib.parse.quote(uri)
 
         if self.show_debug_info:
             uri += '?!debug'