W3C home > Mailing lists > Public > www-html@w3.org > January 1999

Re: &-separator from a form

From: Walter Ian Kaye <walter@natural-innovations.com>
Date: Tue, 5 Jan 1999 09:55:34 -0800
Message-Id: <v03130307b2b7fca3aa63@[]>
To: www-html@w3.org
At 6:22a -0800 01/05/99, Greg Marr wrote:
>At 07:01 PM 1/4/99 , Walter Ian Kaye wrote:
>>Actually it's pretty easy -- my CGI library routine counts the '&'s and ';'s
>>between each name=value pair, and compares the counts to determine the
>That's not quite what I meant.  We were discussing:
>How would your cgi handle that?

Well that's invalid anyway. But I guess you meant


which would split to


Hmm... actually it seems my CGI would handle that example properly,
though only by accident. Turns out my code only looks at one item
rather than checking each item. If value2 were where value1 is, then
it would fail. So as long as the first value contains no ampersands,
then it works fine. I could make it smarter, but it's probably not
worth it. ;)

(Sorry folks, didn't expect to get so programmery.)

Received on Tuesday, 5 January 1999 12:58:18 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:05:49 UTC