From 887e432e5b9dc2c1218a3e21df2d4852432786be Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Thu, 5 Dec 2013 18:33:02 +0100 Subject: [PATCH] fix test --- src/js/crypto/pgp.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/js/crypto/pgp.js b/src/js/crypto/pgp.js index f0a1523..f263504 100644 --- a/src/js/crypto/pgp.js +++ b/src/js/crypto/pgp.js @@ -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({