Same problem as with this ticket i posted for ping.fm:
http://getsatisfaction.com/pingfm/top...
http://bassdrivearchive.com/archives/...(2008-07-04).mp3
is shortened wrong, as you can see.
Note: many implementations of e.g. BBCode (such as the implementation in vBulletin) have the same problem. But the URL I pasted is straight from Firefox "right click, copy location", and I should not have to manually substitute %28 and %29 for the brackets.
According to RFC1738 (
http://www.w3.org/Addressing/rfc1738.txt , section 2.2) the following characters are allowed unescaped in a URL:
$-_.+!*'(),
Of course if you automatically include ) in a URL without you will probably have complaints from people who enclose their entire URLs in brackets (
http://www.example.com/). I would suggest only excluding a final ) or , (and possibly !) if the following character is a disallowed character (e.g. a space) and always including all the others. Also definitely include a ) if the URL ends with it if the URL previously contained a matching number of (s.
See, look, i've done all your work for you. ;)