bug 73974 and bug 77261 r=mcafee and sr=brendan
This commit is contained in:
matt%netscape.com 2001-05-03 01:42:22 +00:00
Родитель b5612e0006
Коммит dee9095f9f
1 изменённых файлов: 7 добавлений и 4 удалений

Просмотреть файл

@ -538,7 +538,9 @@ function OpenBookmarkURL(node, datasources)
function OpenSearch(tabName, forceDialogFlag, searchStr)
{
//This function needs to be split up someday.
var autoOpenSearchPanel = false;
var defaultSearchURL = null;
var fallbackDefaultSearchURL = gNavigatorRegionBundle.getString("fallbackDefaultSearchURL");
@ -547,10 +549,11 @@ function OpenSearch(tabName, forceDialogFlag, searchStr)
// var url = getWebNavigation().currentURI.spec;
var url = _content.location.href;
//Check to see if search string contains "://" or ".".
//Check to see if search string contains "://" or "ftp." or white space.
//If it does treat as url and match for pattern
var urlmatch= /:\/\/|\./ ;
var result = urlmatch.test(searchStr);
var urlmatch= /(:\/\/|^ftp\.)[^ \S]+$/
var forceAsURL = urlmatch.test(searchStr);
try {
autoOpenSearchPanel = pref.GetBoolPref("browser.search.opensidebarsearchpanel");
@ -576,7 +579,7 @@ function OpenSearch(tabName, forceDialogFlag, searchStr)
//Check to see if location bar field is a url
//If it is a url go to URL. A Url is "://" or "." as commented above
//Otherwise search on entry
if (result) {
if (forceAsURL) {
BrowserLoadURL()
} else {
var searchMode = 0;