diff --git a/frontend/src/app/directives/external-link.directive.ts b/frontend/src/app/directives/external-link.directive.ts index e6574b98f..62c55b6f6 100644 --- a/frontend/src/app/directives/external-link.directive.ts +++ b/frontend/src/app/directives/external-link.directive.ts @@ -39,6 +39,11 @@ export class ExternalLinkDirective { let url: string = (event.currentTarget).getAttribute("href") || (event.target).getAttribute("href"); + //check if url starts with https, and if not, prepend it (external links are never relative) + if(!url.startsWith("https://") && !url.startsWith("http://")){ + url = "https://" + url; + } + //check if wails exists and is defined if(typeof wails !== "undefined" && environment.environment_desktop){ wails.CallByName("pkg.AppService.BrowserOpenURL", url)