From f1d7cab271d19cb6d166cdf1a86a0596d05e77f3 Mon Sep 17 00:00:00 2001 From: Antelle Date: Sat, 7 Nov 2015 23:49:48 +0300 Subject: [PATCH] fix #20: default http:// for urls without protocol --- app/scripts/views/fields/field-view-url.js | 6 +++++- release-notes.md | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/scripts/views/fields/field-view-url.js b/app/scripts/views/fields/field-view-url.js index fd7073fb..1815e416 100644 --- a/app/scripts/views/fields/field-view-url.js +++ b/app/scripts/views/fields/field-view-url.js @@ -4,7 +4,11 @@ var FieldViewText = require('./field-view-text'); var FieldViewUrl = FieldViewText.extend({ renderValue: function(value) { - return value ? '' + _.escape(value) + '' : ''; + return value ? '' + _.escape(value) + '' : ''; + }, + + fixUrl: function(url) { + return url.indexOf(':') < 0 ? 'http://' + url : url; } }); diff --git a/release-notes.md b/release-notes.md index 8fce9114..05a3b26b 100644 --- a/release-notes.md +++ b/release-notes.md @@ -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