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

The button to create a link doesn't behave correctly when the text contains brackets.

Suppose you want to create a link from "unicorns -[discussion]"; selecting the text, and clicking the link button produces the following output: [unicorns -discussion].

The brackets surround the selected text, but the "[1]" part is inside those brackets, and not outside.

share|improve this question
up vote 3 down vote accepted

There and there ya go (this is in the next build).

Note that the case of removing a link with the button may still not work quite correctly with brackets in certain cases. Since that's not such a huge issue (as the button is usually used to create links) and anything but trivial (given the way the editor implements this), I'm okay with that for now.

But when creating links via the button, any unescaped brackets are now escaped in the link text, so they don't break the link.

share|improve this answer
This was quick. :-) I agree, the bigger issue was adding links though the button. I think it's rare to remove a link with the button. – kiamlaluno Oct 7 '11 at 16:04

You must log in to answer this question.

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