Try with http if scheme is missing in URI.
urllib3 requests can work around this, e.g., google.com is resolved. However, the browser fails if there's no scheme in the URI. The observation is based on Google Chrome's behaviour. So we try http://google.com. Currently there is no way to override this (i.e. try the URI as it is). We'll need to work on it if there a bug report on this 'forced' behaviour.
This commit is contained in:
parent
8d71f033f2
commit
d4358e113c
7
buku.py
7
buku.py
@ -1241,7 +1241,8 @@ class BukuDb:
|
||||
<H1>Bookmarks</H1>
|
||||
|
||||
<DL><p>
|
||||
<DT><H3 ADD_DATE="%s" LAST_MODIFIED="%s" PERSONAL_TOOLBAR_FOLDER="true">Buku bookmarks</H3>
|
||||
<DT><H3 ADD_DATE="%s" LAST_MODIFIED="%s" PERSONAL_TOOLBAR_FOLDER="true">\
|
||||
Buku bookmarks</H3>
|
||||
<DL><p>
|
||||
''' % (timestamp, timestamp))
|
||||
|
||||
@ -1658,6 +1659,7 @@ def taglist_subprompt(obj):
|
||||
print('Invalid input')
|
||||
new_results = False
|
||||
|
||||
|
||||
def prompt(obj, results, noninteractive=False, deep=False):
|
||||
'''Show each matching result from a search and prompt
|
||||
|
||||
@ -1896,6 +1898,9 @@ def open_in_browser(url):
|
||||
'''
|
||||
|
||||
url = url.replace('%22', '\"')
|
||||
if not urlparse(url).scheme:
|
||||
logger.error('scheme missing in URI, trying http')
|
||||
url = '%s%s' % ('http://', url)
|
||||
|
||||
_stderr = os.dup(2)
|
||||
os.close(2)
|
||||
|
Loading…
Reference in New Issue
Block a user