#89 Redesign HTML parsing for securing PGP decrypted HTML

This commit is contained in:
the-djmaze 2022-02-01 11:46:12 +01:00
parent d9e81d6123
commit 6b26ddec7a
6 changed files with 227 additions and 195 deletions

View file

@ -25,7 +25,6 @@ export class AttachmentModel extends AbstractModel {
this.isLinked = false;
this.isThumbnail = false;
this.cid = '';
this.cidWithoutTags = '';
this.contentLocation = '';
this.download = '';
this.folder = '';
@ -43,7 +42,6 @@ export class AttachmentModel extends AbstractModel {
const attachment = super.reviveFromJson(json);
if (attachment) {
attachment.friendlySize = FileInfo.friendlySize(json.EstimatedSize);
attachment.cidWithoutTags = attachment.cid.replace(/^<+/, '').replace(/>+$/, '');
attachment.fileNameExt = FileInfo.getExtension(attachment.fileName);
attachment.fileType = FileInfo.getType(attachment.fileNameExt, attachment.mimeType);