fix #20: default http:// for urls without protocol

This commit is contained in:
Antelle 2015-11-07 23:49:48 +03:00
parent 44c7ecf035
commit f1d7cab271
2 changed files with 7 additions and 2 deletions

View File

@ -4,7 +4,11 @@ var FieldViewText = require('./field-view-text');
var FieldViewUrl = FieldViewText.extend({
renderValue: function(value) {
return value ? '<a href="' + _.escape(value) + '" target="_blank">' + _.escape(value) + '</a>' : '';
return value ? '<a href="' + _.escape(this.fixUrl(value)) + '" target="_blank">' + _.escape(value) + '</a>' : '';
},
fixUrl: function(url) {
return url.indexOf(':') < 0 ? 'http://' + url : url;
}
});

View File

@ -5,8 +5,9 @@ Bugfixes and new features
`+` improved open page ux
`+` keyfiles from Dropbox
`+` #17: option to hide entries from subgroups
`-` #12: cannot edit entries without title
`+` #13: increase max generated password length
`+` #20: default http:// for urls without protocol
`-` #12: cannot edit entries without title
##### v0.1.1 (2015-11-04)
Bugfix and performance enhancements