WordPress.org

Ready to get started?Download WordPress

Forums

Autolink (Markdown) doesn't work as expected (8 posts)

  1. tbrams
    Member
    Posted 9 years ago #

    An autolink entry works this way using phpMarkdown:

    emSentence...<myname@mydomain.net>em

    transforms into:

    emSentence...myname@mydomain.netem

    However, WordPress apparently kicks in and changes the behavior and the output becomes:

    emSentence...<myname@mydomain.net></myname>em

    Unfortunately I have no clue how to fix this. I am sure there is a workaround or something, but as I am totally new to WordPress, I do not know where to start.

    Looking forward to your reply.

  2. tbrams
    Member
    Posted 9 years ago #

    Sorry for the EM tags above. I thought I included them in backticks

  3. DianeV
    Member
    Posted 9 years ago #

    Hm. Are you trying to write a clickable email address? If so, the code would be:

    <a href="mailto:myname@mydomain.net">myname@mydomain.net</a>

  4. DianeV
    Member
    Posted 9 years ago #

    The above isn't displaying properly in Opera, and apparently I can't edit it, so:

    <a href="mailto:name@site.com">name@site.com</a>

  5. tbrams
    Member
    Posted 9 years ago #

    I am familiar with the syntax above, but really lazy. And now that a nice shorthand for writing a clickable email address in Markdown exist, I really want to use it. This is the feature called called "Autolink".

    If you type <name@site.com> it will be translated to the line you typed out for me above - except it is clever enough to encode the entire mailto address in an attempt to block address harvesting.

    Nice and fast - I really like it. And it works if you call it directly in a php script, but in the edit panel inside wp, this exact feature unfortunately fails.

    but thanks anyway.

  6. chuyskywalker
    Member
    Posted 9 years ago #

    Tbrams, seems to be working fine for me. I'm using MTSpp to set the page I'm testing it on to Markdown and it works fine.

    I can show you the page, but I don't want to post links to the site here yet, so AIM me chuyskywlk if you'd like.

    It's probably worth noting, as well, that the version of markdown in MTSpp is the same one used in the default markdown plugin.

  7. MichelFortin
    Member
    Posted 9 years ago #

    This is WordPress trying to correct what looks like a tag *before* Markdown convert the text to HTML. Try deactivating the “WordPress should correct invalidly nested XHTML automatically� box from the WordPress admin interface in Tools > Writing

  8. tbrams
    Member
    Posted 9 years ago #

    Hi MichelFortin,

    I just tried deslecting the option as you suggested, and it works like a dream.

    Thanks for pointing me in that direction :-)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.