Markdown doesn't always generate XHTML
John MacFarlane
jgm at berkeley.edu
Fri Mar 14 19:01:51 EDT 2008
> However, I know that
> Python-Markdown has an option to not allow any html in a document
> (this "safe_mode" can be set to either replace with a customizable
> message, remove completely, or escape the html). Of course, to stay in
> line with the Markdown standard, it is off by default, but very easy
> to turn on in your code. Other implementations may offer a similar
> option.
Pandoc has the option
--sanitize-html
sanitizes HTML (in markdown or HTML input) using a whitelist.
Unsafe tags are replaced by HTML comments; unsafe attributes are omitted.
John
More information about the Markdown-Discuss
mailing list