aboutsummaryrefslogtreecommitdiffstats
path: root/src/helpers/url-helpers.ts
diff options
context:
space:
mode:
authorLibravatar Vijay A <vraravam@users.noreply.github.com>2022-07-25 08:16:50 +0530
committerLibravatar Vijay A <vraravam@users.noreply.github.com>2022-07-25 08:17:10 +0530
commitcf282aa351cbc58691fb1b2fb4764830247cdbe8 (patch)
tree1a6ac4c9abd8b3de9d358016a5065da86cdd8510 /src/helpers/url-helpers.ts
parent6.0.1-nightly.3 [skip ci] (diff)
downloadferdium-app-cf282aa351cbc58691fb1b2fb4764830247cdbe8.tar.gz
ferdium-app-cf282aa351cbc58691fb1b2fb4764830247cdbe8.tar.zst
ferdium-app-cf282aa351cbc58691fb1b2fb4764830247cdbe8.zip
eslint needs to be executed at the top-level to actually workv6.0.1-nightly.3
Diffstat (limited to 'src/helpers/url-helpers.ts')
-rw-r--r--src/helpers/url-helpers.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/helpers/url-helpers.ts b/src/helpers/url-helpers.ts
index 720f242b4..69a2cc4dc 100644
--- a/src/helpers/url-helpers.ts
+++ b/src/helpers/url-helpers.ts
@@ -24,7 +24,12 @@ export function isValidExternalURL(url: string | URL) {
24} 24}
25 25
26export function fixUrl(url: string | URL) { 26export function fixUrl(url: string | URL) {
27 return url.toString().replaceAll('//', '/').replaceAll('http:/', 'http://').replaceAll('https:/', 'https://').replaceAll('file:/', 'file://'); 27 return url
28 .toString()
29 .replaceAll('//', '/')
30 .replaceAll('http:/', 'http://')
31 .replaceAll('https:/', 'https://')
32 .replaceAll('file:/', 'file://');
28} 33}
29 34
30export function isValidFileUrl(path: string) { 35export function isValidFileUrl(path: string) {