jgbishop / colt

Firefox add-on that makes it easy to copy link text and locations.
Other
10 stars 4 forks source link

Parentheses need to encoded #1

Closed jgbishop closed 10 years ago

jgbishop commented 10 years ago

Parentheses (and other special characters) need to be encoded in copied URLs. Here's an example provided from a user via Born Geek:

URL as it appears copied and pasted from the address bar: http://en.wikipedia.org/wiki/Cat%27s_Eye_%281985_film%29

URL as it appears via CoLT: http://en.wikipedia.org/wiki/Cat%27s_Eye_(1985_film)

If you post the URL (via the add-on) in a forum - it breaks.

jgbishop commented 10 years ago

The encodeURI() function needs to be wrapped around gContextMenu.linkURL. I don't believe it's necessary for the content.document.location.href item; that appears to be given to you already encoded.

jgbishop commented 10 years ago

The more I dig into this, the more I'm convinced that this is an invalid bug. Parentheses are allowed in URIs, and encoding them or not encoding them shouldn't be a factor in their use.

I'm going to close this for now.