From 8d6b237b9e11ad397b2a2766e2c5ca0ba8816c1c Mon Sep 17 00:00:00 2001 From: Ted Pavlic Date: Mon, 8 Dec 2008 16:49:42 -0500 Subject: [PATCH] Fixed ':open stuff://junk' to do a defsearch --- 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 8eb8ae64..ced4c9a0 100644 --- a/common/content/util.js +++ b/common/content/util.js @@ -483,13 +483,13 @@ const util = { //{{{ // if the string // * contains a space OR - // * does NOT have a period or a slash in it + // * does NOT have a period in it // AND // * has no valid protocol // then assume that we want to defsearch (or bookmark // keyword) it. Otherwise, let Firefox figure it out let proto = url.match(/^([-\w]+):/); - if( ( /\s/.test(url) || !/[.\/]/.test(url) ) + if( ( /\s/.test(url) || !/\./.test(url) ) && !( proto && Components.classes["@mozilla.org/network/protocol;1?name=" + proto[1]] ) ) {