| Safe Haskell | None |
|---|
Text.Markdown
- markdown :: MarkdownSettings -> Text -> Html
- data MarkdownSettings
- msXssProtect :: MarkdownSettings -> Bool
- newtype Markdown = Markdown Text
- def :: Default a => a
Functions
markdown :: MarkdownSettings -> Text -> HtmlSource
Convert the given textual markdown content to HTML.
>>>:set -XOverloadedStrings>>>import Text.Blaze.Html.Renderer.Text>>>renderHtml $ markdown def "# Hello World!""<h1>Hello World!</h1>"
>>>renderHtml $ markdown def { msXssProtect = False } "<script>alert('evil')</script>""<script>alert('evil')</script>"
Settings
data MarkdownSettings Source
A settings type providing various configuration options.
See http://www.yesodweb.com/book/settings-types for more information on
settings types. In general, you can use def.
Instances
msXssProtect :: MarkdownSettings -> BoolSource
Whether to automatically apply XSS protection to embedded HTML. Default: True.
Newtype
A newtype wrapper providing a ToHtml instance.