1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

check for existing protocol

This commit is contained in:
Kyle Spearrin
2019-01-07 10:40:11 -05:00
parent e7464785e1
commit f3f17138c8

View File

@@ -177,7 +177,7 @@ export class Utils {
}
let httpUrl = uriString.startsWith('http://') || uriString.startsWith('https://');
if (!httpUrl && Utils.tldEndingRegex.test(uriString)) {
if (!httpUrl && uriString.indexOf('://') < 0 && Utils.tldEndingRegex.test(uriString)) {
uriString = 'http://' + uriString;
httpUrl = true;
}