chore(mail): fix html meta head
This commit is contained in:
parent
38e47a2e99
commit
473cc57727
@ -26,7 +26,7 @@ import qualified Text.Pandoc as P
|
|||||||
import qualified Text.Hamlet as Hamlet
|
import qualified Text.Hamlet as Hamlet
|
||||||
import qualified Text.Shakespeare as Shakespeare (RenderUrl)
|
import qualified Text.Shakespeare as Shakespeare (RenderUrl)
|
||||||
|
|
||||||
import qualified Text.Blaze.Html5 as H
|
-- import qualified Text.Blaze.Html5 as H
|
||||||
|
|
||||||
addRecipientsDB :: ( MonadMail m
|
addRecipientsDB :: ( MonadMail m
|
||||||
, HandlerSite m ~ UniWorX
|
, HandlerSite m ~ UniWorX
|
||||||
@ -199,7 +199,12 @@ addHtmlMarkdownAlternatives' fn html' = do
|
|||||||
markdown <- runMaybeT $ renderMarkdownWith htmlReaderOptions writerOptions html
|
markdown <- runMaybeT $ renderMarkdownWith htmlReaderOptions writerOptions html
|
||||||
|
|
||||||
addAlternatives $ do
|
addAlternatives $ do
|
||||||
let html_meta = H.head $ H.preEscapedText "<meta charset=\"utf-8\">" -- this is probably not the correct way to do this
|
--let html_meta = H.head $ H.preEscapedText "<meta charset=\"utf-8\">" -- this is probably not the correct way to do this
|
||||||
|
let html_meta = [shamlet|
|
||||||
|
$doctype 5
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
|]
|
||||||
providePreferredAlternative $ NamedMailPart { disposition = InlineDisposition $ fn <> ".html", namedPart = html_meta <> html }
|
providePreferredAlternative $ NamedMailPart { disposition = InlineDisposition $ fn <> ".html", namedPart = html_meta <> html }
|
||||||
whenIsJust markdown $ provideAlternative . NamedMailPart (InlineDisposition (fn <> ".txt"))
|
whenIsJust markdown $ provideAlternative . NamedMailPart (InlineDisposition (fn <> ".txt"))
|
||||||
where
|
where
|
||||||
|
|||||||
Reference in New Issue
Block a user