diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index ef9c3a3fbae..1863ce6f553 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/docshell/base/nsWebShell.cpp @@ -121,6 +121,9 @@ #include "nsIExternalProtocolService.h" #include "nsCExternalHandlerService.h" +// Used in the fixup code +#include "prnetdb.h" + #ifdef NS_DEBUG /** * Note: the log module is created during initialization which @@ -860,6 +863,12 @@ nsresult nsWebShell::EndPageLoad(nsIWebProgress *aProgress, keywordsEnabled = PR_FALSE; } + // Don't perform fixup on an IP address + PRNetAddr addr; + if(PR_StringToNetAddr(host.get(), &addr) == PR_SUCCESS) { + keywordsEnabled = PR_FALSE; + } + if(keywordsEnabled && (-1 == dotLoc)) { // only send non-qualified hosts to the keyword server nsCAutoString keywordSpec("keyword:");