Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/passman.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js/app
diff options
context:
space:
mode:
authornewhinton <newhinton@users.noreply.github.com>2018-12-29 19:38:39 +0300
committerGitHub <noreply@github.com>2018-12-29 19:38:39 +0300
commitee335aab8780b94b4a0d965129e7e87efca435ab (patch)
tree1e4fc8eb88cac21218ba2d1f969a50d1659c58ed /js/app
parentb5f7baab12493fd81629eadcdbb8e6ff88e97182 (diff)
fixed wrong url-creation which appended multiple protocols
Diffstat (limited to 'js/app')
-rw-r--r--js/app/directives/credentialfield.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/app/directives/credentialfield.js b/js/app/directives/credentialfield.js
index eb82dc06..feb54fd0 100644
--- a/js/app/directives/credentialfield.js
+++ b/js/app/directives/credentialfield.js
@@ -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) {