Question

Why are round brackets escaped when copy/pasting URLs from Firefox, in contravention of RFC3987?

Go to any site, and add a 'hash fragment' to the end of the URL that contains round brackets. Copy that URL out of Firefox and paste into a text editor, like so:

https://developer.mozilla.org/en-US/#%28testing%29

Note that the round brackets have been escaped into %28 and %29 characters.

RFC3987 specifies that "(" and ")" are 'gen-delimiters' are are _not_ equivalent to their escape codes. Replacing these characters with their escape codes is as incorrect (according to the spec) as replacing the "$" or "!" characters (which are not escaped in FF or other browsers) and the "'" (apostrophe) character, which universally is. No, I don't understand it either.

Worse, this behavior does not match what the other major browsers do, so Firefox has essentially broken the promise that URLs are universal. If there are any reasons for doing this, they have not been made clear or documented, that I can find.

The hash fragment is increasingly being used to store 'client side' information, and so messing with these characters is breaking applications. I'm trying to understand if there's a good reason why, or just poor programming. In which case, I'll log a bug report.

↓ Show more ↑ Show less
  • All posts
  • Helpful Solutions
  • post
  • owner
  • helpful
  • owner
  • owner
  • owner
  • owner
  • owner
  • post
  • owner
  • owner
  • post