On Tue, Nov 05, 2002 at 10:38:17AM -0800, Randal L. Schwartz wrote:
> >>>>> "Stefano" == Stefano  <[EMAIL PROTECTED]> writes:
> 
[...]
> Stefano>      <img src="/myscript_image_generator/?p1=1&p2=2&p3=3">
[...]
> 
> Which is wrong.  That needs to be "&amp;" where you have "&"
> 
> That "it works" merely means that you have been lucky, and someone
> has error-corrected for you.
> 
> Do not rely on constant error correction.  It will definitely break
> some day.
> 
> -- 
> Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[...]


Randall,

Can you elaborate on this?  Should query parameters always
be separated by '&amp;' or ';' rather than '&'?

Should 
<img src="http://a.b.c/d?e=1&f=2&g=3";>
<a href="http://a.b.c/d?e=1&f=2&g=3";>misc</a>
<form action="http://a.b.c/d?e=1&f=2&g=3";>...</form>

be changed to
<img src="http://a.b.c/d?e=1&amp;f=2&amp;g=3";>
<a href="http://a.b.c/d?e=1&amp;f=2&amp;g=3";>misc</a>
<form action="http://a.b.c/d?e=1&amp;f=2&amp;g=3";>...</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). 
  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&#38;y=2";>
  or <A href="http://host/?x=1&amp;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. 


--
Matthew Pressly



_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://www.template-toolkit.org/mailman/listinfo/templates

Reply via email to