Yuri Takhteyev wrote:
I am with Waylan on this one. :)

Our approach has been to give the user the choice of three options:
we'll remove HTML-like tags, or escape them, or leave them.  Trying to
sort them into HTML and non-HTML tags would be too error-prone and
limiting (for the reasons Waylan mentioned).

That said, there is no reason why markdown libraries couldn't accept
an explicit list of "valid" tags as a parameter:

    html = markdown.markdown(text, extensions, options,
allowed_tags=['a', 'i', 'b', 'img'])

I suppose we could even set a few constants for you, so you could do
something like:

    html = markdown.markdown(text, extensions, options,
allowed_tags=markdown.HTML5_TAGS)

In general, perhaps we should think more in terms of what options
markdown libraries should support rather than in terms of what
Markdown does by default.

 - yuri

In a not-exactly-related problem, I have been using a personal wiki to manage my personal info. I use PHP Markdown Extra (for the tables) for the markup. Part of that info is e-mail addresses. I paste the address and then surround with < ... > to make it a link. Unfortunately, if the e-mail address is [EMAIL PROTECTED], the "link" becomes a html hard return instead. If I add the mailto: in front then it becomes a link.

Interestingly, if I look at the page source the hard return shows up as <[EMAIL PROTECTED]>. I would think that anything with an @ should be, if valid, converted to an e-mail address.
_______________________________________________
Markdown-Discuss mailing list
[email protected]
http://six.pairlist.net/mailman/listinfo/markdown-discuss

Reply via email to