mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-24 16:14:01 +08:00
fix(mailto): Never launch the default app to handle mailto
This commit is contained in:
parent
603a3dfb4b
commit
230718772c
1 changed files with 3 additions and 2 deletions
|
@ -2,7 +2,7 @@ path = require 'path'
|
||||||
{$} = require './space-pen-extensions'
|
{$} = require './space-pen-extensions'
|
||||||
_ = require 'underscore'
|
_ = require 'underscore'
|
||||||
{Disposable} = require 'event-kit'
|
{Disposable} = require 'event-kit'
|
||||||
{shell, ipcRenderer} = require 'electron'
|
{shell, ipcRenderer, remote} = require 'electron'
|
||||||
{Subscriber} = require 'emissary'
|
{Subscriber} = require 'emissary'
|
||||||
fs = require 'fs-plus'
|
fs = require 'fs-plus'
|
||||||
url = require 'url'
|
url = require 'url'
|
||||||
|
@ -192,7 +192,8 @@ class WindowEventHandler
|
||||||
# We sometimes get mailto URIs that are not escaped properly, or have been only partially escaped.
|
# We sometimes get mailto URIs that are not escaped properly, or have been only partially escaped.
|
||||||
# (T1927) Be sure to escape them once, and completely, before we try to open them. This logic
|
# (T1927) Be sure to escape them once, and completely, before we try to open them. This logic
|
||||||
# *might* apply to http/https as well but it's unclear.
|
# *might* apply to http/https as well but it's unclear.
|
||||||
shell.openExternal(encodeURI(decodeURI(href)))
|
href = encodeURI(decodeURI(href))
|
||||||
|
remote.getGlobal('application').openUrl(href)
|
||||||
else if schema in ['http:', 'https:', 'tel:']
|
else if schema in ['http:', 'https:', 'tel:']
|
||||||
shell.openExternal(href)
|
shell.openExternal(href)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue