#89 Decrypt and verify with OpenPGP.js and GnuPG

This commit is contained in:
the-djmaze 2022-02-11 11:01:07 +01:00
parent 85f9209176
commit e0e490c64f
8 changed files with 354 additions and 315 deletions

View file

@ -459,8 +459,7 @@ export class MessageModel extends AbstractModel {
body.classList.toggle('plain', 1);
body.innerHTML = plainToHtml(
this.plain()
.replace(/-----BEGIN PGP SIGNATURE-----[\s\S]*/, '')
.replace(/-----BEGIN PGP SIGNED MESSAGE-----(\r?\n[a-z][^\r\n]+)+/i, '')
.replace(/-----BEGIN PGP (SIGNED MESSAGE-----(\r?\n[a-z][^\r\n]+)+|SIGNATURE-----[\s\S]*)/, '')
.trim()
)
.replace(url, '$1<a href="$2" target="_blank">$2</a>')