From 9be1936b05b273eb73955286c4e14ef63a446b53 Mon Sep 17 00:00:00 2001 From: Martin Stubenschrott Date: Mon, 8 Dec 2008 21:47:18 +0100 Subject: [PATCH] Fixed :open test.com --- common/content/util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/content/util.js b/common/content/util.js index 342f89af..8cc19fce 100644 --- a/common/content/util.js +++ b/common/content/util.js @@ -481,11 +481,11 @@ const util = { //{{{ // strip each 'URL' - makes things simpler later on url = url.replace(/^\s+|\s+$/, ""); - // if the string doesn't look like a valid URL (i.e. contains a space + // if the string doesn't look like a valid URL (i.e. contains a space or no dot) // or starts with a known protocol try opening it with a search engine // or keyword bookmark let proto = url.match(/^([-\w]+):/); - if (/\s/.test(url) || !proto || !Components.classes["@mozilla.org/network/protocol;1?name=" + proto[1]]) + if (!/\./.test(url) && (/[\s]/.test(url) || !proto || !Components.classes["@mozilla.org/network/protocol;1?name=" + proto[1]])) { // TODO: it would be clearer if the appropriate call to // getSearchURL was made based on whether or not the first word was