diff --git a/browser/components/MarkdownPreview.js b/browser/components/MarkdownPreview.js index ff88540f..fc5aa95c 100755 --- a/browser/components/MarkdownPreview.js +++ b/browser/components/MarkdownPreview.js @@ -1135,7 +1135,17 @@ export default class MarkdownPreview extends React.Component { } // other case - shell.openExternal(href) + this.openExternal(href) + } + + openExternal (href) { + try { + const success = shell.openExternal(href) || shell.openExternal(decodeURI(href)) + if (!success) console.error('failed to open url ' + href) + } catch (e) { + // URI Error threw from decodeURI + console.error(e) + } } render () {