What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 133 Stack Exchange communities.

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

1 Answer 1

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 .