Bugfix OpenPGP.js sign HTML failed #600

This commit is contained in:
the-djmaze 2022-11-01 19:52:24 +01:00
parent d993b213a7
commit d416ab3642
2 changed files with 2 additions and 2 deletions

View file

@ -161,7 +161,7 @@ export const
*/
const body = message.body;
body.textContent = '';
let result = await mailvelope.createDisplayContainer(
result = await mailvelope.createDisplayContainer(
'#'+body.id,
armoredText,
this.mailvelopeKeyring,

View file

@ -169,7 +169,7 @@ class MimePart {
const hasSub = this.children.length,
boundary = this.boundary || (this.boundary = 'part' + Jua.randomId()),
headers = this.headers;
if (hasSub) {
if (hasSub && !headers['Content-Type'].includes(boundary)) {
headers['Content-Type'] += `; boundary="${boundary}"`;
}
let result = Object.entries(headers).map(([key, value]) => `${key}: ${value}`).join('\r\n') + '\r\n';