mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
Fixed PGP import
This commit is contained in:
parent
c4aabb0cd4
commit
470b3645e2
5 changed files with 16 additions and 4 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue