Can't build a link to a Twitter username


(Patrick Klug) #1

Example: If I want to link to example@codinghorror.com it should display this as a URL and not as a username.


(Jeff Atwood) #2

Not sure I follow. In your example you are using

mailto:example@codinghorror.com

But we don’t support mailto links by design.


(Patrick Klug) #3

How about this then:

[@codinghorror](https://twitter.com/codinghorror)

turns into @codinghorror. This is meant to be a link to twitter, instead shows as a username. Hyperlinks should be ignored when identifying usernames.


(Sam Saffron) #4

That is a rather odd bug. A bit of an edge case, but a bug nonetheless.

cc @eviltrout


(Johan Jatko) #5

You can do(and should do) mailto links(can do regular links as well) with <mail@example.com>

mail@example.com

They are generally better protected(or atleast should be) against bots harvesting emails*.


(Kane York) #6

You sure about that?

Rendered HTML:

<p><a href="mailto:mail@example.com">mail@example.com</a></p>

The downside of this is that it won’t let you pre-fill the subject line or body, like raw mailto: links do. EDIT: Discourse will not allow you to put a raw mailto: link in your post without editing the code.


(Johan Jatko) #7

Yup, I noticed that it doesn’t here. Hence my ( )'s in the above sentence.
I don’t know which markdown renderer is used by Discourse but it should render them as daringfireball.net does IMO.

And true about the raw mailto links, but I rarely see those nowdays. =)


(Jeff Atwood) #8

I see so you mean Twitter specifically, you want to write a name that conflicts with a local name and have it be a link. I am not sure that’s a bug, I would expect the local name to have precedence over the twitter name.

I’d say you should do something like @codinghorror instead.

[`@codinghorror`](https://www.twitter.com/codinghorror)

(Patrick Klug) #9

I disagree. When I create a hyperlink, then whatever I pick as the display text should be displayed as the (clickable) link.

There shouldn’t be other rules that would interfere with this and turn part of the link into something else that’s also clickable but points to somewhere else.

While

[`@codinghorror`](https://www.twitter.com/codinghorror)

is a great workaround for the bug I think that this is a bug.


(Allen - Watchman Monitoring) #10

Related to the OP, I can’t make a link with my email address, and have it display the email address, because it includes my username

[watchman@watchmanmonitoring.com][1]
[1]: mailto:watchman@watchmanmonitoring.com

shows as:

watchman@watchmanmonitoring.com


(Jeff Atwood) #11

As I said a few posts above, mailto links are not supported.


Can't create mailto links in posts
(Robin Ward) #12

I’ve got a fix to prevent linking to @mentions ready. Should be deployed soon :smile:


(Sam Saffron) #13

Looks like its fixed, closing


(Sam Saffron) #14