Bug 1509493 - Always linkify common URL schemes in plain text r=BenB

Differential Revision: https://phabricator.services.mozilla.com/D13511

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Fabian Henneke 2018-12-02 16:20:05 +00:00
parent 7d113fddff
commit 0d5da0fca2

View File

@ -341,6 +341,10 @@ bool mozTXTToHTMLConv::ShouldLinkify(const nsCString& aURL) {
nsresult rv = mIOService->ExtractScheme(aURL, scheme);
if (NS_FAILED(rv)) return false;
if (scheme == "http" || scheme == "https" || scheme == "mailto") {
return true;
}
// Get the handler for this scheme.
nsCOMPtr<nsIProtocolHandler> handler;
rv = mIOService->GetProtocolHandler(scheme.get(), getter_AddRefs(handler));