diff options
author | 2022-05-05 18:37:32 -0500 | |
---|---|---|
committer | 2022-05-05 23:37:32 +0000 | |
commit | 875dedc70a08c2cc132536d18490d89bf34f7335 (patch) | |
tree | 75a17913d6140b3b6dfa473858c52ce32e8a8c44 /src/helpers/url-helpers.ts | |
parent | fix: modify user agent string on Linux (#99) (diff) | |
download | ferdium-app-875dedc70a08c2cc132536d18490d89bf34f7335.tar.gz ferdium-app-875dedc70a08c2cc132536d18490d89bf34f7335.tar.zst ferdium-app-875dedc70a08c2cc132536d18490d89bf34f7335.zip |
Diffstat (limited to 'src/helpers/url-helpers.ts')
-rw-r--r-- | src/helpers/url-helpers.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/helpers/url-helpers.ts b/src/helpers/url-helpers.ts index ddbf4b4f7..ef2805595 100644 --- a/src/helpers/url-helpers.ts +++ b/src/helpers/url-helpers.ts | |||
@@ -15,6 +15,9 @@ export function isValidExternalURL(url: string | URL) { | |||
15 | } catch { | 15 | } catch { |
16 | return false; | 16 | return false; |
17 | } | 17 | } |
18 | if (url.toString().endsWith('/')) { | ||
19 | return false; | ||
20 | } | ||
18 | 21 | ||
19 | const isAllowed = ALLOWED_PROTOCOLS.includes(parsedUrl.protocol); | 22 | const isAllowed = ALLOWED_PROTOCOLS.includes(parsedUrl.protocol); |
20 | 23 | ||