Skip to content

Commit

Permalink
fix: add support for m-files:// links
Browse files Browse the repository at this point in the history
adrianschmidt committed Nov 21, 2023
1 parent b1d8028 commit da6420e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/util/link-helper.ts
Original file line number Diff line number Diff line change
@@ -33,7 +33,16 @@ function isValid(href: string) {
}

function hasKnownProtocol(input: string) {
const knownProtocols = ['ftp', 'ftps', 'https', 'http'];
const knownProtocols = [
'ftp',
'ftps',
'https',
'http',

// m-files is a protocol used by the M-Files desktop app or something.
// It's not a web protocol, but it allows open M-Files links in their app.
'm-files',
];

return knownProtocols.some((knownProtocol) => {
return input.indexOf(knownProtocol + '://') === 0;

0 comments on commit da6420e

Please sign in to comment.