mirror of
https://github.com/nextcloud/passman.git
synced 2025-02-26 08:24:00 +08:00
fixed wrong url-creation which appended multiple protocols
This commit is contained in:
parent
b5f7baab12
commit
ee335aab87
1 changed files with 4 additions and 4 deletions
|
@ -68,16 +68,16 @@
|
|||
}
|
||||
if (regex.test(scope.value)) {
|
||||
scope.isLink = true;
|
||||
if(scope.value.substr(0,4) !== 'http'){
|
||||
var val = scope.value;
|
||||
scope.value =val.substr(val.indexOf("://")+3,val.length);
|
||||
}
|
||||
} else if (regex.test('http://'+scope.value) && scope.isURL){
|
||||
//This part is added to check if the user did not add http or https to the url and match it nonetheless
|
||||
scope.isLink = true;
|
||||
} else {
|
||||
scope.isLink = false;
|
||||
}
|
||||
if(scope.value.substr(0,4) !== 'http'){
|
||||
var val = scope.value;
|
||||
scope.value =val.substr(val.indexOf("://")+3,val.length);
|
||||
}
|
||||
}
|
||||
});
|
||||
if (!scope.toggle) {
|
||||
|
|
Loading…
Reference in a new issue