dont pass non strings to validator.js #4462

v1.18.x
barisusakli 9 years ago
parent f277c66089
commit ae8c40f8a8

@ -240,9 +240,9 @@ var utils = require('../public/src/utils');
Groups.escapeGroupData = function(group) {
if (group) {
group.nameEncoded = encodeURIComponent(group.name);
group.displayName = validator.escape(group.name);
group.description = validator.escape(group.description || '');
group.userTitle = validator.escape(group.userTitle || '') || group.displayName;
group.displayName = validator.escape(String(group.name));
group.description = validator.escape(String(group.description || ''));
group.userTitle = validator.escape(String(group.userTitle || '')) || group.displayName;
}
};

Loading…
Cancel
Save