From 4bb1a115951057f5da08ffec52f49c63e640dda2 Mon Sep 17 00:00:00 2001 From: Iain Lane Date: Sat, 6 Sep 2008 16:01:12 +0100 Subject: [PATCH] Assume http:// for URLs without it --- terminatorlib/terminatorterm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/terminatorlib/terminatorterm.py b/terminatorlib/terminatorterm.py index 70def21b..b69dac1c 100755 --- a/terminatorlib/terminatorterm.py +++ b/terminatorlib/terminatorterm.py @@ -832,7 +832,10 @@ text/plain if url: if url[1] != self.matches['email']: - address = url[0] + if url[1]: # Assume HTTP if we launch a URL with no protocol, otherwise xdg-open won't open it + address = "http://" + url[0] + else: + address = url[0] nameopen = _("_Open Link") namecopy = _("_Copy Link Address") iconopen = gtk.image_new_from_stock(gtk.STOCK_JUMP_TO, gtk.ICON_SIZE_MENU)