diff options
author | Vijay Aravamudhan <vraravam@users.noreply.github.com> | 2022-05-14 22:36:26 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-15 03:36:26 +0000 |
commit | f4fd7dcfe7b84e54999062325a268d786975ab12 (patch) | |
tree | 16da4ff6baf742c3bbd50488737d130e9a1c8795 /src/helpers/url-helpers.ts | |
parent | 6.0.0-nightly.35 [skip ci] (diff) | |
download | ferdium-app-f4fd7dcfe7b84e54999062325a268d786975ab12.tar.gz ferdium-app-f4fd7dcfe7b84e54999062325a268d786975ab12.tar.zst ferdium-app-f4fd7dcfe7b84e54999062325a268d786975ab12.zip |
Fix issue where the replacement of double-slash was over-aggressive (#151)
Diffstat (limited to 'src/helpers/url-helpers.ts')
-rw-r--r-- | src/helpers/url-helpers.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/helpers/url-helpers.ts b/src/helpers/url-helpers.ts index 1eda325da..720f242b4 100644 --- a/src/helpers/url-helpers.ts +++ b/src/helpers/url-helpers.ts | |||
@@ -24,7 +24,7 @@ export function isValidExternalURL(url: string | URL) { | |||
24 | } | 24 | } |
25 | 25 | ||
26 | export function fixUrl(url: string | URL) { | 26 | export function fixUrl(url: string | URL) { |
27 | return url.toString().replaceAll('//', '/').replace('http:/', 'http://').replace('https:/', 'https://').replace('file:/', 'file://'); | 27 | return url.toString().replaceAll('//', '/').replaceAll('http:/', 'http://').replaceAll('https:/', 'https://').replaceAll('file:/', 'file://'); |
28 | } | 28 | } |
29 | 29 | ||
30 | export function isValidFileUrl(path: string) { | 30 | export function isValidFileUrl(path: string) { |