changeset 3606:f8589028a7fa

hgweb: split URLs containing spaces or other escaped characters correctly
author Brendan Cully <brendan@kublai.com>
date Tue, 31 Oct 2006 18:10:23 -0800
parents 9d815b074dcb
children f4c9bb4ad7b1
files mercurial/hgweb/hgweb_mod.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py
+++ b/mercurial/hgweb/hgweb_mod.py
@@ -708,7 +708,7 @@ class hgweb(object):
                     return '%s%s%s' % (url.startswith('/') and '/' or '',
                                        inner, tl)
 
-                root = normurl(req.env.get('REQUEST_URI', '').split('?', 1)[0])
+                root = normurl(urllib.unquote(req.env.get('REQUEST_URI', '').split('?', 1)[0]))
                 pi = normurl(req.env.get('PATH_INFO', ''))
                 if pi:
                     # strip leading /