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

Re: &-separator from a form

From: Walter Ian Kaye <walter@natural-innovations.com>
Date: Tue, 22 Dec 1998 14:32:29 -0800
Message-Id: <v03130317b2a5c59ecf4d@[134.79.129.61]>
To: www-html@w3.org
At 12:50p -0800 12/22/98, Taco IJsselmuiden wrote:
>Hi,
>
>Is there any way to define the separator (&) used when using a form ??
>(i.e.:
><form action=cgi.cgi method=get>
><input type=text name=one value="something">
><input type=text name=two value="another thing">
><input type=submit value="submit">
></form>
>
>would result in this url:
>http://..../cgi-bin/cgi.cgi?one=something&two=another+thing
>)
>
>The problem with this is, that & has a special meaning in HTML, so using
>such an URL in a HTML-page is not perfect.

But the separators never appear in the HTML page when you are using the
<form>...</form>, so it's not a problem there. It's only a problem when
you embed the equivalent URL.

>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.

It's not hard for a CGI to figure out which separator was sent. In my own
Perl library I count the &'s and ;'s, and then determine from the counts
which separator was used, and then split on that.


-Walter
Received on Tuesday, 22 December 1998 17:32:40 GMT

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