diff options
author | Lucian Branescu Mihaila <lucian.branescu@gmail.com> | 2010-06-18 20:48:51 (GMT) |
---|---|---|
committer | Lucian Branescu Mihaila <lucian.branescu@gmail.com> | 2010-06-18 20:48:51 (GMT) |
commit | 3005541c3bc94f493fab0753ef774aff88db79ea (patch) | |
tree | 93bf24525e99989259cca519bb77ace85635b35a | |
parent | fbeef143285c74c6aea1ea26423846e1a75b612b (diff) |
Fix 'http'-adding feature to not add an extra /, like 'http:///google.com'.
-rw-r--r-- | browser.py | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -178,13 +178,10 @@ class Browser(webkit.WebView): def __init__(self): webkit.WebView.__init__(self) - #self.history = HistoryListener() - #self.progress = ProgressListener() - def load_uri(self, uri): - p_uri = urlparse.urlparse(uri) - if p_uri.schema == '' and p_uri.netloc == '': - return urlparse.urlparse(p_uri.path, 'http') + r = urlparse.urlparse(uri) + if r.schema == '' and r.netloc == '': + return urlparse.ParseResult('http', r.path, '', '', '', '').geturl() return uri |