Merge pull request #956 from mattermost/MM-13349
open certain internal paths in default browser
This commit is contained in:
@@ -99,6 +99,9 @@ export default class MattermostView extends React.Component {
|
|||||||
if (Utils.isInternalURL(destURL, currentURL, this.state.basename)) {
|
if (Utils.isInternalURL(destURL, currentURL, this.state.basename)) {
|
||||||
if (destURL.path.match(/^\/api\/v[3-4]\/public\/files\//)) {
|
if (destURL.path.match(/^\/api\/v[3-4]\/public\/files\//)) {
|
||||||
ipcRenderer.send('download-url', e.url);
|
ipcRenderer.send('download-url', e.url);
|
||||||
|
} else if (destURL.path.match(/^\/help\//)) {
|
||||||
|
// continue to open special case internal urls in default browser
|
||||||
|
shell.openExternal(e.url);
|
||||||
} else {
|
} else {
|
||||||
// New window should disable nodeIntegration.
|
// New window should disable nodeIntegration.
|
||||||
window.open(e.url, remote.app.getName(), 'nodeIntegration=no, show=yes');
|
window.open(e.url, remote.app.getName(), 'nodeIntegration=no, show=yes');
|
||||||
|
Reference in New Issue
Block a user