Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 157 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

Compare and contrast how the site renders the following three links:




The site behaves correctly. Chat... not quite as much. This is how chat renders each of these links:


You can see the Stack Exchange RandomSneaky ComplimentarySemicolon* pop up out of nowhere in line 2. You can see this in action here.

What's up with the Stack Exchange RandomSneaky ComplimentarySemicolon*?

*I'm sorry. So, so sorry.

share|improve this question
You're not sorry at all! – Tim Stone Jan 5 '13 at 23:08
This should also likely happen in comments:; – Tim Stone Jan 5 '13 at 23:14
Related: strange character replacement on SO. – Arjan Jan 6 '13 at 15:00

The MarkdownMini implementation used in comments and chat uses a quick and simple approach to avoiding escaped characters – it simply converts them to HTML entities, so when you slash escape the parenthesis at the end, you're actually getting

text = text.Replace(@"\)", ")");

The autolinker regex doesn't allow for the trailing character to be a semicolon, so it lops it off when taking your URL and you get a link with a href value of

where the browser ever so helpfully decides that the malformed entity is the closing parenthesis your heart desired.

Not necessarily the most desired behaviour, but short of making the escape process a bit more complicated for this specific case, I'm not sure there's much to be done about it.

share|improve this answer
You've likely confused me for Tim Post – Tim Stone Jan 6 '13 at 15:05
ahh.. Sorry about that. – AsheeshR Jan 6 '13 at 15:05
It happens quite often, don't worry ;) – Tim Stone Jan 6 '13 at 15:06
Hmm.. this whole thing wouldn't be a problem if the autolinker were smart enough to swallow trailing close parentheses when there's a corresponding unclosed open parenthesis in the link. Of course, if it's really implemented as just a single regex, that could get a bit tricky. (Not impossible, at least not with modern PCRE variants, but tricky.) – Ilmari Karonen Jan 7 '13 at 2:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .