Fixing nsbeta2+ bug 41718, the docshell did case sensitive string compares when it checked if the protocol of a URL was 'javascript', this broke upper and mixed cased javascript: URL's. r=shaver

This commit is contained in:
jst@netscape.com
2000-06-08 13:58:02 +00:00
parent 77a3555454
commit 87f82f9f4a

View File

@@ -2627,7 +2627,7 @@ NS_IMETHODIMP nsDocShell::DoURILoad(nsIURI* aURI, nsIURI* aReferrerURI,
static const char kJavaScriptScheme[] = "javascript";
nsXPIDLCString scheme;
aURI->GetScheme(getter_Copies(scheme));
if (0 == PL_strncmp(NS_STATIC_CAST(const char*, scheme), kJavaScriptScheme, sizeof(kJavaScriptScheme) - 1)) {
if (0 == PL_strncasecmp(NS_STATIC_CAST(const char*, scheme), kJavaScriptScheme, sizeof(kJavaScriptScheme) - 1)) {
channel->SetOriginalURI(aReferrerURI ? aReferrerURI : aURI);
}
else {