From d65d62926492964fee5886fcf9688b0be15905ae Mon Sep 17 00:00:00 2001 From: Sanjana Rajan Date: Thu, 15 Dec 2016 10:39:29 -0800 Subject: [PATCH] trim name --- src/openpgp.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/openpgp.js b/src/openpgp.js index 50167cd4..658a52be 100644 --- a/src/openpgp.js +++ b/src/openpgp.js @@ -391,6 +391,7 @@ function formatUserIds(options) { if (!util.isString(id.name) || (id.email && !util.isEmailAddress(id.email))) { throw new Error('Invalid user id format'); } + id.name = id.name.trim(); if (id.name.length > 0) { id.name += ' '; }