[Zope] Any alternative to &arg in URL?

Alexander Staubo alex@mop.no
Thu, 30 Sep 1999 19:16:29 +0200


> -----Original Message-----
> From: Martijn Pieters [mailto:mj@antraciet.nl]
> Sent: 30. september 1999 09:33
> To: John Hermes; zope@zope.org
> Subject: Re: [Zope] Any alternative to &arg in URL?
> 
> 
> At 23:18 29/09/99 , John Hermes wrote:
> >I am working on a site using both POST and GET
> >forms and I use URL args frequently in the target:
> >
> >action="subfolder/index_html?arg1=spam&arg2=eggs&.
> >.."
> >
> >Using the '&' character in URLs is not legal HTML
> >(4.0-strict). Does Zope recognize other arg
> >separators besides '&'?  I don't want to give up
> >the way Zope parses and places the args into the
> >namespace for me.
> >
> >Any thoughts would be much appreciated!
> 
> & is indeed illegal in a URL, but the part after the ? is the 
> query string, 
> and there they _are_ legal, and HTML FORMS using METHOD=GET 
> will always 
> encode the form contents like that.

The problem is not with the CGI interface, but with the validity of the
HTML. HTML 4.0 treats attribute values rigidly according to the
character encoding, and & denotes a character entity. See the HTML
standard (RFC 1866), section 8.2.1/footnote 26. See also
http://www.cs.duke.edu/~dsb/kgv-faq/errors.html#bad-entity.

Admittedly it's a quibble that should only confuse SGML parsers, but
it's fact.

> --
> Martijn Pieters, Web Developer
> | Antraciet http://www.antraciet.nl
> | Tel: +31-35-7502100 Fax: +31-35-7502111
> | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
> | PGP: 
> http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
> ------------------------------------------

-- 
Alexander Staubo             http://www.mop.no/~alex/
"`Ford, you're turning into a penguin. Stop it.'"
--Douglas Adams, _The Hitchhiker's Guide to the Galaxy_