reference/inline mailto links vs shorthand mailto links

Brian Forte bforte at adelaide.on.net
Sat Apr 9 00:13:59 EDT 2005


Gentlefolk,

The current state of things with regards mailto links and Markdown is 
as follows:

____________________________________________________
Input 1 (automatic links shorthand)

    <username at example.com>


Output 1

    <p><a
    href="m&#97;&#x69;&#108;&#116;o:&#x75;&#x73;&#x65;r&#110;&#
    97;&#x6D;&#101;&#64;&#101;&#x78;&#x61;&#x6D;&#x70;&#x6C;&#
    x65;.&#x63;&#111;&#109;">&#x75;&#x73;&#x65;r&#110;&#97;&#x6D
    ;&#101;&#64;&#101;&#x78;&#x61;&#x6D;&#x70;&#x6C;&#x65;.&#x63
    ;&#111;&#109;</a></p>
____________________________________________________

____________________________________________________
Input 2 (reference and inline links)

    e-mail [me] [1] or [him](mailto:username2 at example.com "or
    here")

    [1]: mailto:username at example.com
        "send e-mail here"


Output 2

    <p>e-mail <a href="mailto:username at example.com" title="send
    e-mail here">me</a> or <a
    href="mailto:username2 at example.com" title="or
    here">him</a></p>
____________________________________________________


What I'd dearly love is for Markdown to transform reference or inline 
mailto links in similar fashion to the automatic links shorthand. 
That is:

____________________________________________________
Input 3 (feature request)

    e-mail [me] [1] or [him](mailto:username2 at example.com "or
    here")

    [1]: mailto:username at example.com
        "send e-mail here"


Output 3

    <p>e-mail <a
    href="m&#97;&#x69;&#108;&#116;o:&#x75;&#x73;&#x65;r&#110;&#
    97;&#x6D;&#101;&#64;&#101;&#x78;&#x61;&#x6D;&#x70;&#x6C;&#
    x65;.&#x63;&#111;&#109;" title="send e-mail here">me</a> or
    <a
    href="&#109;a&#x69;&#108;&#116;&#111;:&#x75;s&#101;&#114;&#
    x6E;&#97;&#x6D;&#x65;&#x32;&#64;&#x65;&#x78;&#97;&#x6D;&#x70
    ;&#108;&#101;&#x2E;&#99;&#x6F;&#x6D;" title="or
    here">him</a></p>
____________________________________________________


This would provide entity-encoding to keep address-harvesting 
spambots at bay (as they have mostly done on several sites where I've 
manually marked up mailto links in this fashion over the years) while 
retaining the high readability of the ASCII source text.

Thoughts? Objections? Explanations showing how difficult this is to implement?

Regards,

Brian Forte
-- 
Brian Forte, <mailto:bforte at betweenborders.com>
Writer, editor, scripter, dangerous mind.


More information about the Markdown-Discuss mailing list