From 3005541c3bc94f493fab0753ef774aff88db79ea Mon Sep 17 00:00:00 2001 From: Lucian Branescu Mihaila Date: Fri, 18 Jun 2010 20:48:51 +0000 Subject: Fix 'http'-adding feature to not add an extra /, like 'http:///google.com'. --- diff --git a/browser.py b/browser.py index 8b7b941..8a14831 100644 --- a/browser.py +++ b/browser.py @@ -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 -- cgit v0.9.1