mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-04 12:12:20 +03:00
Small fixes
This commit is contained in:
parent
1241b14b9d
commit
310dbf9224
7 changed files with 160 additions and 156 deletions
|
|
@ -22,12 +22,15 @@ function PopupsAddOpenPgpKeyViewModel()
|
|||
iCount = 30,
|
||||
aMatch = null,
|
||||
sKey = Utils.trim(this.key()),
|
||||
oReg = /[\-]{3,6}BEGIN PGP (PRIVATE|PUBLIC) KEY BLOCK[\-]{3,6}[\s\S]+[\-]{3,6}END PGP (PRIVATE|PUBLIC) KEY BLOCK[\-]{3,6}/gi,
|
||||
oReg = /[\-]{3,6}BEGIN[\s]PGP[\s](PRIVATE|PUBLIC)[\s]KEY[\s]BLOCK[\-]{3,6}[\s\S]+?[\-]{3,6}END[\s]PGP[\s](PRIVATE|PUBLIC)[\s]KEY[\s]BLOCK[\-]{3,6}/gi,
|
||||
oOpenpgpKeyring = RL.data().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');
|
||||
|
||||
this.key.error('' === sKey);
|
||||
|
||||
|
||||
if (!oOpenpgpKeyring || this.key.error())
|
||||
{
|
||||
return false;
|
||||
|
|
@ -61,7 +64,7 @@ function PopupsAddOpenPgpKeyViewModel()
|
|||
|
||||
RL.reloadOpenPgpKeys();
|
||||
Utils.delegateRun(this, 'cancelCommand');
|
||||
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue