Fixed PGP import

This commit is contained in:
RainLoop Team 2015-03-26 16:46:17 +04:00
parent c4aabb0cd4
commit 470b3645e2
5 changed files with 16 additions and 4 deletions

View file

@ -41,8 +41,11 @@
oOpenpgpKeyring = PgpStore.openpgpKeyring
;
sKey = sKey.replace(/[\r\n]([a-zA-Z0-9]{2,}:[^\r\n]+)[\r\n]+([a-zA-Z0-9\/\\+=]{10,})/g, '\n$1!-!N!-!$2')
.replace(/[\n\r]+/g, '\n').replace(/!-!N!-!/g, '\n\n');
if (/[\n]/.test(sKey))
{
sKey = sKey.replace(/[\r]+/g, '')
.replace(/[\n]{2,}/g, '\n\n');
}
this.key.error('' === sKey);