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 a9471ddc8a
commit 64a6328c06

View File

@ -2627,7 +2627,7 @@ NS_IMETHODIMP nsDocShell::DoURILoad(nsIURI* aURI, nsIURI* aReferrerURI,
static const char kJavaScriptScheme[] = "javascript"; static const char kJavaScriptScheme[] = "javascript";
nsXPIDLCString scheme; nsXPIDLCString scheme;
aURI->GetScheme(getter_Copies(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); channel->SetOriginalURI(aReferrerURI ? aReferrerURI : aURI);
} }
else { else {