Fix for bugscape bug # 1644. keywords work eventhough the pref for it is turned off.
r=valeski a=mscott git-svn-id: svn://10.0.0.236/trunk@80016 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1005,6 +1005,7 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader,
|
||||
NS_ERROR_FAILURE);
|
||||
|
||||
// we should only perform a keyword search under the following conditions:
|
||||
// (0) Pref keyword.enabled is true
|
||||
// (1) the url scheme is http (or https)
|
||||
// (2) the url does not have a protocol scheme
|
||||
// If we don't enforce such a policy, then we end up doing keyword searchs on urls
|
||||
@@ -1014,10 +1015,10 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader,
|
||||
// if we want keywords enabled...this is just a bandaid...
|
||||
static const char httpSchemeName[] = "http";
|
||||
|
||||
if (schemeStr.IsEmpty() || !schemeStr.Find(httpSchemeName) )
|
||||
keywordsEnabled = PR_TRUE; // keep keywors enabled for this url
|
||||
else
|
||||
keywordsEnabled = PR_FALSE; // all other cases, disable keywords for this url.
|
||||
if (keywordsEnabled) {
|
||||
if (!schemeStr.IsEmpty() && ((schemeStr.Find(httpSchemeName)) != 0))
|
||||
keywordsEnabled = PR_FALSE;
|
||||
}
|
||||
|
||||
if(keywordsEnabled && (-1 == dotLoc))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user