[Templates] template-toolkit and GD
Matthew Pressly
mpressly@claborn.net
Wed, 6 Nov 2002 13:24:41 -0600
On Tue, Nov 05, 2002 at 10:38:17AM -0800, Randal L. Schwartz wrote:
> >>>>> "Stefano" =3D=3D Stefano <stedis@antartide.org> writes:
>=20
[...]
> Stefano> <img src=3D"/myscript_image_generator/?p1=3D1&p2=3D2&p3=3D3">
[...]
>=20
> Which is wrong. That needs to be "&" where you have "&"
>=20
> That "it works" merely means that you have been lucky, and someone
> has error-corrected for you.
>=20
> Do not rely on constant error correction. It will definitely break
> some day.
>=20
> --=20
> Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 00=
95
[...]
Randall,
Can you elaborate on this? Should query parameters always
be separated by '&' or ';' rather than '&'?
Should=20
<img src=3D"http://a.b.c/d?e=3D1&f=3D2&g=3D3">
<a href=3D"http://a.b.c/d?e=3D1&f=3D2&g=3D3">misc</a>
<form action=3D"http://a.b.c/d?e=3D1&f=3D2&g=3D3">...</form>
be changed to
<img src=3D"http://a.b.c/d?e=3D1&f=3D2&g=3D3">
<a href=3D"http://a.b.c/d?e=3D1&f=3D2&g=3D3">misc</a>
<form action=3D"http://a.b.c/d?e=3D1&f=3D2&g=3D3">...</form>
Do you also have any references on this? So far I have found this:
http://www.w3.org/TR/1998/REC-html40-19980424/appendix/notes.html#h-B.2.2
which states:
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).=20
Unfortunately, the use of the "&" character to separate form fields=20
interacts with its use in SGML attribute values to delimit character=20
entity references. For example, to use the URI "http://host/?x=3D1&y=3D2"=
=20
as a linking URI, it must be written <A href=3D"http://host/?x=3D1&y=
=3D2">
or <A href=3D"http://host/?x=3D1&y=3D2">.=20
=20=20
We recommend that HTTP server implementors, and in particular, CGI=20
implementors support the use of ";" in place of "&" to save authors=20
the trouble of escaping "&" characters in this manner.=20
--
Matthew Pressly