From 473cc57727a669bdc43d303b8ad61915c8b27553 Mon Sep 17 00:00:00 2001 From: Steffen Jost Date: Wed, 21 Dec 2022 16:23:43 +0100 Subject: [PATCH] chore(mail): fix html meta head --- src/Handler/Utils/Mail.hs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Handler/Utils/Mail.hs b/src/Handler/Utils/Mail.hs index 9abab840e..e0b13af8c 100644 --- a/src/Handler/Utils/Mail.hs +++ b/src/Handler/Utils/Mail.hs @@ -26,7 +26,7 @@ import qualified Text.Pandoc as P import qualified Text.Hamlet as Hamlet import qualified Text.Shakespeare as Shakespeare (RenderUrl) -import qualified Text.Blaze.Html5 as H +-- import qualified Text.Blaze.Html5 as H addRecipientsDB :: ( MonadMail m , HandlerSite m ~ UniWorX @@ -199,7 +199,12 @@ addHtmlMarkdownAlternatives' fn html' = do markdown <- runMaybeT $ renderMarkdownWith htmlReaderOptions writerOptions html addAlternatives $ do - let html_meta = H.head $ H.preEscapedText "" -- this is probably not the correct way to do this + --let html_meta = H.head $ H.preEscapedText "" -- this is probably not the correct way to do this + let html_meta = [shamlet| + $doctype 5 + + + |] providePreferredAlternative $ NamedMailPart { disposition = InlineDisposition $ fn <> ".html", namedPart = html_meta <> html } whenIsJust markdown $ provideAlternative . NamedMailPart (InlineDisposition (fn <> ".txt")) where