[Zope] Any alternative to &arg in URL?
Tres Seaver
tseaver@palladion.com
Thu, 30 Sep 1999 09:10:35 -0500
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!
>
>John Hermes jhermes@infoglobe.com
W3.org's HTML 4 spec () sez:
--------------------------------------------------------------------------------
B.2.2 Ampersands in URI attribute values
The URI that is constructed when a form is submitted may be used as an
anchor-style link (e.g., the href attribute for the A element). Unfortunately,
the use of the "&" character to separate form fields interacts with its use
in SGML attribute values to delimit character entity references. For example,
to use the URI "http://host/?x=1&y=2" as a linking URI, it must be written
<A href="http://host/?x=1&y=2"> or <A href="http://host/?x=1&y=2">.
We recommend that HTTP server implementors, and in particular, CGI implementors
support the use of ";" in place of "&" to save authors the trouble of escaping
"&" characters in this manner.
--------------------------------------------------------------------------------
I don't see a problem with continuing to use the ampersand in URL's which are
constructed on the fly to be used in a GET request. The only problem lies in
trying to embed them within an HTML document; not a common use case.
--
================================================================================
Tres Seaver tseaver@palladion.com http://www.palladion.com
Palladion Software Houston, Texas, USA 713-523-6582