1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 16:27:59 +01:00
This commit is contained in:
Martin Stubenschrott
2007-04-30 10:59:43 +00:00
parent 7b2994c579
commit 635e4f5566
2 changed files with 9 additions and 3 deletions

View File

@@ -1331,9 +1331,13 @@ function stringToURLs(str)
/* if the string contains a space or does not contain any of: .:/
* open it with default search engine */
var default_engine = search_service.defaultEngine;
if (default_engine)
urls[url] = default_engine.getSubmission(urls[url], null).uri.spec;
if (urls[url].match(/\s+/) || urls[url].match(/\.|:|\//) == null)
{
var default_engine = search_service.defaultEngine;
if (default_engine)
urls[url] = default_engine.getSubmission(urls[url], null).uri.spec;
continue;
}
// check for ./ and ../ (or even .../) to go to a file in the upper directory