diff --git a/caps/nsScriptSecurityManager.cpp b/caps/nsScriptSecurityManager.cpp
index 196f3eec80..8522046b29 100644
--- a/caps/nsScriptSecurityManager.cpp
+++ b/caps/nsScriptSecurityManager.cpp
@@ -863,18 +863,12 @@ nsScriptSecurityManager::CheckLoadURIWithPrincipal(nsIPrincipal* aPrincipal,
}
}
- // resource: and chrome: are equivalent, securitywise
- // That's bogus!! Fix this. But watch out for
- // the view-source stylesheet?
- bool sourceIsChrome;
- rv = NS_URIChainHasFlags(sourceURI,
- nsIProtocolHandler::URI_IS_UI_RESOURCE,
- &sourceIsChrome);
- NS_ENSURE_SUCCESS(rv, rv);
- if (sourceIsChrome) {
+ // Allow chrome://
+ if (sourceScheme.EqualsLiteral("chrome")) {
return NS_OK;
}
+ // Nothing else.
if (reportErrors) {
ReportError(nullptr, errorTag, sourceURI, aTargetURI);
}
diff --git a/netwerk/streamconv/converters/nsIndexedToHTML.cpp b/netwerk/streamconv/converters/nsIndexedToHTML.cpp
index 3bc998bb32..e18b929297 100644
--- a/netwerk/streamconv/converters/nsIndexedToHTML.cpp
+++ b/netwerk/streamconv/converters/nsIndexedToHTML.cpp
@@ -533,30 +533,6 @@ nsIndexedToHTML::DoOnStartRequest(nsIRequest* request, nsISupports *aContext,
buffer.AppendLiteral("\n");
- // If there is a quote character in the baseUri, then
- // lets not add a base URL. The reason for this is that
- // if we stick baseUri containing a quote into a quoted
- // string, the quote character will prematurely close
- // the base href string. This is a fall-back check;
- // that's why it is OK to not use a base rather than
- // trying to play nice and escaping the quotes. See bug
- // 358128.
-
- if (baseUri.FindChar('"') == kNotFound)
- {
- // Great, the baseUri does not contain a char that
- // will prematurely close the string. Go ahead an
- // add a base href.
- buffer.AppendLiteral("\n");
- }
- else
- {
- NS_ERROR("broken protocol handler didn't escape double-quote.");
- }
-
nsCString direction(NS_LITERAL_CSTRING("ltr"));
nsCOMPtr reg =
mozilla::services::GetXULChromeRegistryService();