mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
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:
parent
7d113fddff
commit
0d5da0fca2
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user