From da6420e45bf5430fa96ee558bab1126085ac715a Mon Sep 17 00:00:00 2001 From: Adrian Schmidt Date: Tue, 21 Nov 2023 14:08:58 +0100 Subject: [PATCH] fix: add support for `m-files://` links --- src/util/link-helper.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/util/link-helper.ts b/src/util/link-helper.ts index 89ec25a807..697da5902c 100644 --- a/src/util/link-helper.ts +++ b/src/util/link-helper.ts @@ -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;