From 86826cc9db516ae4771928a791fa38d52d9c9a9f Mon Sep 17 00:00:00 2001 From: Stephen Paul Weber Date: Tue, 7 Nov 2023 10:13:01 -0500 Subject: [PATCH] Never include SMIL, even if marked as attachment --- Email.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Email.hs b/Email.hs index d02cd0c..dd2bbc7 100644 --- a/Email.hs +++ b/Email.hs @@ -93,9 +93,12 @@ getAttachmentsAndMedia :: (Monoid a) => -> Const a (MIME.ContentType, ByteString)) -> MIME.MIMEMessage -> Const a MIME.MIMEMessage getAttachmentsAndMedia = MIME.entities . filtered (\part -> - MIME.isAttachment part || has (MIME.contentType . + (MIME.isAttachment part || has (MIME.contentType . + filtered (\(MIME.ContentType t _ _) -> + t /= s"text" + ) + ) part) && has (MIME.contentType . filtered (\(MIME.ContentType t sub _) -> - t /= s"text" && not (t == s"application" && sub == s"smil") ) ) part -- 2.45.2