Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

This question already has an answer here:

While reviewing I noticed that the URL that was posted as one of the answers looked weird to me:


I clicked on the edit link to see if the user had perhaps posted some broken HTML, but all I found was a bare URL:

Here's how the above URL renders currently:


(I'm assuming) it should look like this:

EDIT: I wonder if it has anything to do with the double underscore that is causing the word "leopard" to appear italicized?

Let's try that out by removing the double underscore:

Aha! That must be it.

share|improve this question

marked as duplicate by balpha Apr 11 '14 at 9:15

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

This also blew up a YouTube video I tried to put on a page. – CyberSkull Jan 3 '12 at 20:15
up vote 4 down vote accepted

It looks like the auto-linker passes in the URL as-is, the result of which is then fed to the method that handles bold/italics. This causes an <em> tag to appear in the href attribute of the link, the HTML sanitizer gets angry, and you end up with the mess that you see there.

The most direct fix seems to be to have the auto-linker do what the normal linker does and have the replace method do ml = escapeCharacters(ml, "*_") when inserting the URL in the preview, and the equivalent link = EscapeBoldItalic(link) in MarkdownSharp. I need to verify that this doesn't break anything else, but if it doesn't I'll submit patches later provided this isn't fixed before then.

I should add that with links that ugly it's much nicer if they have a proper descriptive text anyway, but the behaviour does seem buggy in either case.

Update: It seems that this was already because Jeff felt it was too much of an edge case, but I've gone ahead and made a fix for Pagedown anyway.

share|improve this answer
Does your fix get used in SO? The link to the commit in your answer is currently 404. – nhahtdh Feb 20 '13 at 5:07
Oh, whoops. But no, it's not used on SO. – Tim Stone Feb 20 '13 at 13:18