Re: &-separator from a form

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
& 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 UTC