Mr. Clean wrote:
& won't freaking work because it has ANOTHER & in it...DUH...
Use %36 type encoding instead.
Actually, & doesn't work because it's encoding the character at the
wrong layer of the different languages and protocols involved here.
This can get a bit confusing, but basically...
In URIs (the term URL is being deprecated in the newest Internet draft
on the subject in favor of URI), the ampersand is a reserved character,
used to separate parameters. (For instance, in a "mailto" URI, if you
have multiple parameters such as "subject" and "body", they're separated
by ampersands.) When you need an ampersand in a URI in any other
context, you're supposed to encode it as %26 (not %36, which is the
digit "6"). This "percent-sign" encoding is the standard method of
encoding characters in URIs to prevent them from being interpreted in
their reserved meanings.
In HTML, there are also some reserved characters which must be encoded
when used in other contexts, and one of them is the ampersand. The way
to encode it is as &. You would do this, for instance, with any
ampersand within a URI which is being used in its URI-reserved meaning
(to separate parameters), and hence is not encoded as %26.
Here's a sample piece of HTML that uses both encoding forms properly:
<A HREF="mailto:th*********@example.net?subject=this& amp;body=that">
Not that I recommend using "subject" and "body" parameters in "mailto"
URIs, due to browser and mail client support problems, but the standards
do allow it.
--
== Dan ==
Dan's Mail Format Site:
http://mailformat.dan.info/
Dan's Web Tips:
http://webtips.dan.info/
Dan's Domain Site:
http://domains.dan.info/