From d6238f84a43b848b86bca5ba55b465fad9bdba73 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Wed, 25 Mar 2009 01:58:39 +0000 Subject: [PATCH] Treat strings containing / as URLs In lieu of getting proper hostname detection, allow localhost/ and other similar URLs to work. --- common/content/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/content/util.js b/common/content/util.js index 8ea3d22a..24a167e2 100644 --- a/common/content/util.js +++ b/common/content/util.js @@ -675,7 +675,7 @@ const util = { //{{{ // Ok, not a valid proto. If it looks like URL-ish (foo.com/bar), // let Gecko figure it out. - if (/[.]/.test(url) && !/\s/.test(url) || /^[\w-.]+:\d+(?:\/|$)/.test(url)) + if (/[.\/]/.test(url) && !/\s/.test(url) || /^[\w-.]+:\d+(?:\/|$)/.test(url)) return url; // TODO: it would be clearer if the appropriate call to