For example, this won't work with the linking feature:

http://java.sun.com/j2se/1.5.0/docs/api/java/util/Arrays.html#binarySearch(int[], int)

If I try and [link it][1] this is the result.

[1]: http://java.sun.com/j2se/1.5.0/docs/api/java/util/Arrays.html#binarySearch(int[], int)


2 Answers 2


examples removed as they are now obsolete -- we do auto-encode parens and brackets now.

Bottom line, in all cases you'll have to encode the space and comma.


Since the <a> method doesn't work for this URL

Like so: Binary Search

I use TinyURL, which I've especially used with Amazon when they have funky characters (like the (C) symbol) in their URL. When using TinyURL, at least tell people where they're going, since it obscures the end point.

Perhaps that transition could be made easier, but I know URL parsing is hard, and I just figure it's easier to do it that way than having Jeff et al try to fix some esoteric exceptions.

  • 4
    Please don't. I like being able to see where a link leads before following it; TinyURL makes that difficult. You can almost always use normal HTML <a> links to work around issues with "difficult" URLs on SO.
    – Shog9
    Commented Jul 4, 2009 at 3:51
  • @Shog: The <a> method doesn't work for the address supplied by cletus.
    – Eric
    Commented Jul 4, 2009 at 4:18
  • Yeah... looks like the code parsing square brackets takes precedence over all else. Sad. You can still manually URL-encode the difficult characters though: java.sun.com/j2se/1.5.0/docs/api/java/util/…
    – Shog9
    Commented Jul 4, 2009 at 4:25
  • well, I'll be darned. I didn't realize the square bracket stuff took precedence. Commented Aug 22, 2009 at 8:29

You must log in to answer this question.

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