In your testing, did you try a URL with a query string with the same field repeated, like /foo/bar?field=foo&field=bar ?
If so, what was the resulting set of hidden fields? - Geoff > -----Original Message----- > From: Steve Freitas [mailto:[EMAIL PROTECTED]] > Sent: Thursday, June 20, 2002 2:54 PM > To: Geoffrey Talvola; Webware Discuss > Subject: Re: [Webware-discuss] Re: Session glitches with actions under > SecurePage? > > > > Better would be to do: > > > > for name, value in self.request().fields().items(): > > > > which will work, and also saves an additional dictionary > lookup for each > > item. > > > > 2) You need to encode the value in case it contains a double-quote > > character. value.replace('"', '"') should do the > trick I think. > > Check. Let me know what you think of the attached patch. > > > 3) I believe that the values in the dict can be strings OR > lists of strings. > > So you need to check if the value is a list, and if so, > loop over the items > > in the list and output a separate hidden field for each > item in the list. > > This will happen with a URL like > /foo/bar?field=foo&field=bar in which case > > you'll have a fields dict like {'field': ['foo', 'bar']} I think. > > I haven't tried explicitly checking for type list, but I've > tried this with > multiple values, and it works fine. Do you still suggest > handling type list? > > Steve > ------------------------------------------------------- Sponsored by: ThinkGeek at http://www.ThinkGeek.com/ _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
