mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
make sure uri has . in it before prefixing http
This commit is contained in:
@@ -43,13 +43,12 @@ angular
|
|||||||
ctrl.icon = 'fa-apple';
|
ctrl.icon = 'fa-apple';
|
||||||
ctrl.image = null;
|
ctrl.image = null;
|
||||||
}
|
}
|
||||||
else if (ctrl.imageEnabled && hostnameUri.indexOf('://') === -1 && hostnameUri.indexOf('http://') !== 0 &&
|
else if (ctrl.imageEnabled && hostnameUri.indexOf('://') === -1 && hostnameUri.indexOf('.') > -1) {
|
||||||
hostnameUri.indexOf('https://') !== 0) {
|
|
||||||
hostnameUri = "http://" + hostnameUri;
|
hostnameUri = "http://" + hostnameUri;
|
||||||
isWebsite = true;
|
isWebsite = true;
|
||||||
}
|
}
|
||||||
else if (ctrl.imageEnabled) {
|
else if (ctrl.imageEnabled) {
|
||||||
isWebsite = hostnameUri.indexOf('http') === 0 && hostnameUri.indexOf('.') > 0;
|
isWebsite = hostnameUri.indexOf('http') === 0 && hostnameUri.indexOf('.') > -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctrl.imageEnabled && isWebsite) {
|
if (ctrl.imageEnabled && isWebsite) {
|
||||||
|
|||||||
Reference in New Issue
Block a user