Adding a "Safe" option?

european bob bob at wolfwall.com
Tue Apr 27 03:35:27 EDT 2004


On Tue, 2004-04-27 at 02:20, Jason Clark wrote:
> However, I'm thinking of modifying my MD for my own use, and I'd like
> to think out loud here a bit, and maybe get some feedback.  If you're
> a purist, please avert your eyes ;-).

If you want to meddle with a Markdown parser, you might find xMarkdown
easier - no ordering issues, smaller codebase.

> I'd like to use Markdown on my site to format comments.  (FWIW, mine is 
> a Blosxom blog, not MT.)  Additionally, I do not want to allow any raw 
> HTML to beentered in comments.  Only Markup-generated XHTML will be 
> allowed.  However, I can't just strip anything that looks like html 
> before passing it to markup, since I want to allow code samples to 
> contain HTML.

In xMarkdown, you can probably just 'return undef;' at the top of
processHTML(); I think that does what you want (in document HTML will
disappear, unless it's in a code block, in which case it just gets
passed through encoded).

--bob.



More information about the Markdown-discuss mailing list