aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/helpers/urls.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main/js/helpers/urls.ts')
-rw-r--r--server/sonar-web/src/main/js/helpers/urls.ts12
1 files changed, 0 insertions, 12 deletions
diff --git a/server/sonar-web/src/main/js/helpers/urls.ts b/server/sonar-web/src/main/js/helpers/urls.ts
index de21ce40a5e..ecb965a112a 100644
--- a/server/sonar-web/src/main/js/helpers/urls.ts
+++ b/server/sonar-web/src/main/js/helpers/urls.ts
@@ -252,15 +252,3 @@ export function getHomePageUrl(homepage: HomePage) {
// should never happen, but just in case...
return '/projects';
}
-
-export function isUrl(url: string) {
- try {
- const elem = document.createElement('a');
- elem.href = url;
- return !!(elem.host && elem.hostname && elem.protocol);
- } catch (error) {
- // both IE11 & Edge throw an exception when a url contains credentials
- // is this case let's just pretend the url is fine and pass it to the server for the validation
- return true;
- }
-}