W3C home > Mailing lists > Public > www-html@w3.org > December 1998

Re: &-separator from a form

From: Greg Marr <gregm@alum.wpi.edu>
Date: Wed, 23 Dec 1998 08:46:21 -0500
Message-Id: <4.1.19981223084336.00e22c70@pop.ma.ultranet.com>
To: www-html@w3.org
Cc: Taco IJsselmuiden <taco@ch.twi.tudelft.nl>
At 04:30 PM 12/22/98 , kgeorge@tcpsoft.com wrote:
>
> Taco IJsselmuiden wrote:
> > Is there any way to define the separator (&) used when using a form ??
> > 
> > The problem with this is, that & has a special meaning in HTML, so using
> > such an URL in a HTML-page is not perfect.
> > I could use (i.e.) ; as a separator in the HTML-page, but still most UA's
> > use & when data is submitted trough a form. That's not very practical,
> > having two different separators.

>Taco - 
>
>"%26" is all you need.  0x26 is 38 in decimal which is the ascii code
>for the "&" character.  Download the html/http spec(s) from somewhere
>and read about URL encoding.  Of course, you will have to un-encode the
>number when you get it ... but that is fairly trivial.

There is no need to URL-encode the ampersand.  It needs to be protected from
the HTML parser, not the network layers.  URL encoding it will only help if you
write your script to handle it, and isn't a general-purpose solution.  Using
&amp; instead of & will protect it from the HTML parser, which is all that is
necessary.

--
Greg Marr
gregm@alum.wpi.edu
"We thought you were dead." 
"I was, but I'm better now." - Sheridan, "The Summoning"
Received on Wednesday, 23 December 1998 08:44:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:38 GMT