mirror of
https://github.com/nextcloud/passman.git
synced 2025-11-09 13:44:40 +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)) {
|
if (regex.test(scope.value)) {
|
||||||
scope.isLink = true;
|
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){
|
} 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
|
//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;
|
scope.isLink = true;
|
||||||
} else {
|
} else {
|
||||||
scope.isLink = false;
|
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) {
|
if (!scope.toggle) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue