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.


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.

  • 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
  • 1
    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](https://stackoverflow.com/questions/4170978/explain-why-this-works)  

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

Just insert this:

> **Possible Duplicate:**  
> https://stackoverflow.com/questions/4170978/explain-why-this-works

<!-- 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

  • 4
    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
  • 1
    Plus, this would make it easier to be consistent when editing in multiple duplicates. – Kevin Vermeer Sep 27 '11 at 15:05
  • 2
    +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 http://stackoverflow.com/questions/4170978: keep the title out of it altogether. – Lightness Races BY-SA 3.0 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 .