diff --git a/js/app/controllers/credential.js b/js/app/controllers/credential.js
index 4c885576..5457d17b 100644
--- a/js/app/controllers/credential.js
+++ b/js/app/controllers/credential.js
@@ -11,8 +11,8 @@
*/
angular.module('passmanApp')
.controller('CredentialCtrl', ['$scope', 'VaultService', 'SettingsService', '$location', 'CredentialService',
- '$rootScope', 'FileService', 'EncryptService', 'TagService', '$timeout', 'NotificationService', 'CacheService', 'ShareService', 'SharingACL', '$interval', '$filter', '$routeParams',
- function ($scope, VaultService, SettingsService, $location, CredentialService, $rootScope, FileService, EncryptService, TagService, $timeout, NotificationService, CacheService, ShareService, SharingACL, $interval, $filter, $routeParams) {
+ '$rootScope', 'FileService', 'EncryptService', 'TagService', '$timeout', 'NotificationService', 'CacheService', 'ShareService', 'SharingACL', '$interval', '$filter', '$routeParams', '$sce',
+ function ($scope, VaultService, SettingsService, $location, CredentialService, $rootScope, FileService, EncryptService, TagService, $timeout, NotificationService, CacheService, ShareService, SharingACL, $interval, $filter, $routeParams, $sce) {
$scope.active_vault = VaultService.getActiveVault();
if (!SettingsService.getSetting('defaultVault') || !SettingsService.getSetting('defaultVaultPass')) {
if (!$scope.active_vault) {
@@ -344,6 +344,7 @@
$scope.selectedCredential = false;
$scope.selectCredential = function (credential) {
+ credential.description_html = $sce.trustAsHtml(angular.copy(credential.description).replace("\n", ' '));
$scope.selectedCredential = angular.copy(credential);
$rootScope.$emit('app_menu', true);
};
diff --git a/js/app/controllers/edit_credential.js b/js/app/controllers/edit_credential.js
index d96894df..18a60da4 100644
--- a/js/app/controllers/edit_credential.js
+++ b/js/app/controllers/edit_credential.js
@@ -257,7 +257,8 @@
delete _credential.shared_key;
var _useKey = (key != null);
-
+ var regex = /(<([^>]+)>)/ig;
+ _credential.description = _credential.description.replace(regex, "");
CredentialService.updateCredential(_credential, _useKey).then(function (result) {
SettingsService.setSetting('edit_credential', null);
$location.path('/vault/' + $routeParams.vault_id);
diff --git a/js/templates.js b/js/templates.js
index fb387827..dc931148 100644
--- a/js/templates.js
+++ b/js/templates.js
@@ -15,7 +15,7 @@ angular.module('views/edit_credential.html', []).run(['$templateCache', function
angular.module('views/partials/forms/edit_credential/basics.html', []).run(['$templateCache', function($templateCache) {
'use strict';
$templateCache.put('views/partials/forms/edit_credential/basics.html',
- '
');
+ '');
}]);
angular.module('views/partials/forms/edit_credential/custom_fields.html', []).run(['$templateCache', function($templateCache) {
@@ -113,7 +113,7 @@ angular.module('views/share_credential.html', []).run(['$templateCache', functio
angular.module('views/show_vault.html', []).run(['$templateCache', function($templateCache) {
'use strict';
$templateCache.put('views/show_vault.html',
- 'Showing deleted since: All time {{delete_time | date:\'dd-MM-yyyy @ HH:mm:ss\'}} +
Showing {{filtered_credentials.length}} of {{active_vault.credentials.length - 1}} credentials
{{ ::tag.text}} {{ ::credential.label}}
');
+ 'Showing deleted since: All time {{delete_time | date:\'dd-MM-yyyy @ HH:mm:ss\'}} +
Showing {{filtered_credentials.length}} of {{active_vault.credentials.length - 1}} credentials
{{ ::tag.text}} {{ ::credential.label}}
');
}]);
angular.module('views/vaults.html', []).run(['$templateCache', function($templateCache) {
diff --git a/templates/views/partials/forms/edit_credential/basics.html b/templates/views/partials/forms/edit_credential/basics.html
index 8edc50ff..56cf57d8 100644
--- a/templates/views/partials/forms/edit_credential/basics.html
+++ b/templates/views/partials/forms/edit_credential/basics.html
@@ -28,7 +28,7 @@
-
Description
+
Notes
diff --git a/templates/views/show_vault.html b/templates/views/show_vault.html
index 5aa27625..691c068a 100644
--- a/templates/views/show_vault.html
+++ b/templates/views/show_vault.html
@@ -123,6 +123,11 @@
value="selectedCredential.url">
+
+