This commit is contained in:
Tankred Hase 2013-12-05 18:33:02 +01:00
parent 3700e211ec
commit 887e432e5b
1 changed files with 3 additions and 4 deletions

View File

@ -159,11 +159,10 @@ define(function(require) {
receiverKeys[i] = openpgp.read_publicKey(receiverKeys[i])[0];
}
// format: \n -> \r\n
plaintext = plaintext.replace(/\r\n/g, '\n').replace(/[\t ]+\n/g, "\n").replace(/\n/g, '\r\n');
// encrypt and sign the plaintext
try {
// format: \n -> \r\n
plaintext = plaintext.replace(/\r\n/g, '\n').replace(/[\t ]+\n/g, "\n").replace(/\n/g, '\r\n');
// encrypt and sign the plaintext
ct = openpgp.write_signed_and_encrypted_message(privateKey, receiverKeys, plaintext);
} catch (err) {
callback({