In 3/4 browsers, ^ is converted to %5E.
However, in Mozilla, it is not:-
load up the following and click on the link and notice the location
IE6, Opera, Safari 3:
My understanding says that firefox is wrong on this one.
Data must be escaped if it does not have a representation using an
RFC 3986 (Jan 1995) clearly states which characters are allowed in
| Characters that are allowed in a URI but do not have a reserved
| purpose are called unreserved. These include uppercase and
| letters, decimal digits, hyphen, period, underscore, and tilde.
| unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
Copying the generated URIs results in Mozilla following HTML 4.01,
Special characters in URI attribute values, which
| Although URIs do not contain non-ASCII values (see [URI], section
| 2.1) authors sometimes specify them in attribute values expecting
| (i.e., defined with %URI; in the DTD). For instance, the following
| value is illegal:
| We recommend that user agents adopt the following convention for
| non-ASCII characters in such cases:
| 1. Represent each character in UTF-8 (see [RFC2279]) as one or
| 2. Escape these bytes with the URI escaping mechanism (i.e., by
| each byte to %HH, where HH is the hexadecimal notation of the byte
The "national" and "punctuation" characters (which includes "^") do
in any productions and therefore may not appear in URLs.
It gets worse. When setting innerHTML on an element, if the new HTML
string has a '^', mozilla turns that into %5E, but all other browsers
leave it as '^'.
Our application uses ^ literally. The URL handling service must send
and receive the same characters. This can be either %5E or ^. If
sending %5E to the client, if ^ comes back, the server will not use
that as a key, and if '^' is sent to the client and %5E comes back,
the server will not compare them as being equal.