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 was recently closed as a duplicate of (![]+[])[+[]]… Explain why this works. However, the inserted link blows up as the weird title does not get escaped properly in the resulting markdown.


Of course, a point could be made that the title of the question should be changed, but it would still probably be a good idea to get the escaping right, as these characters are allowed in a title and do not carry any special meaning there, only when copied verbatim into markdown code.

share|improve this question
Related: ctrl + i to italicize does not always work right. Markdown doesn't seem to be escaped when necessary. – Jeremy Banks Aug 27 '11 at 0:30
@JeremyBanks - How is that related? – Kevin Vermeer Sep 27 '11 at 15:07
@KevinVermeer: They're both caused by Markdown being automatically transformed naively as though it were plain text. – Jeremy Banks Sep 27 '11 at 15:45
up vote 9 down vote accepted

This will be fixed in the next build. We'll be escaping [ and ] as we already do for question titles inserted into the "possible duplicate..." comments.

share|improve this answer
Are those the only characters that can cause problems? – Matthew Read Sep 27 '11 at 15:10
@Matthew - in this particular case, since it's the [title](link) format that blows up here. We use that shorthand because the "Possible duplicate:" section needs to be completely self-contained. – Nick Craver Sep 27 '11 at 15:11
OK, thanks for the info! Congrats on 20k :P – Matthew Read Sep 27 '11 at 15:15
Shouldn't all markup be escaped? For example, in this edit a question with a python argument named __code__ in the title is linked, and that is of course interpreted as markdown. Since titles are plain text, any markdown markup should be ignored. – Martijn Pieters Jul 2 '12 at 11:22
Or better still, implement the other answer to this question and not insert the title at all. – Martijn Pieters Jul 2 '12 at 11:26

There's an easy fix for this. Instead of inserting this:

> **Possible Duplicate:**  
> [(![]+[])[+[]]… Explain why this works](  

<!-- End of automatically inserted text -->

Just insert this:

> **Possible Duplicate:**  

<!-- End of automatically inserted text -->

The link gets displayed as the question title anyways (without needing to explicitly specify the title) like so:

Possible Duplicate:
(![]+[])[+[]]... Explain why this works

share|improve this answer
Using the direct link would also be possible to know when the duplicated question has been deleted; in that case, the link will not converted in a title. – kiamlaluno Sep 20 '11 at 16:59
Plus, this would make it easier to be consistent when editing in multiple duplicates. – Kevin Vermeer Sep 27 '11 at 15:05
+1 for this. A question was closed as duplicate whilst the thing it's a duplicate of was very temporarily called "About to be deleted". This title was made semi-permanent in the dup banner until I went and modified it manually. Just insert keep the title out of it altogether. – Lightness Races in Orbit Oct 10 '11 at 18:46

You must log in to answer this question.

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