Re: shouldn't http::formatQuery be slightly modified
- From: jenglish@xxxxxxxxxxxxx (Joe English)
- Date: 14 Jul 2006 14:57:34 GMT
Gerhard Hintermayer wrote:
I recently checked the site I maintain (cgi-scripts based on tcl) with
the W3C html-validator at http://validator.w3.org/ and discovered that
the validator warns on URI's that contain unescaped & (ampersands) like
in <scriptname>?<par1>=<val1>&<par2>=<val2>... the validator suggests to
use & instead of &. FF1.5 and IE6 interpret these correct.
As I'm using http::formatQuery to insert the Links into the pages the
easiest way was to modify the http.tcl file supplied with core tcl.
Is there any reason to not making this change to the core ?
Shall I file a TIP ? Even for adding only 4 chars to the body of
http::formatQuery ?
http::formatQuery returns a URL-encoded query string.
If you want to put the result in an HTML attribute value,
you have to do another round of substitution to encode
HTML delimiters (&, <, and sometimes >, ', and ").
Making http::formatQuery return an HTML-encoded URL-encoded
string would be a bad idea; there are lots of places where
you need URL-encoded (only) values.
--Joe English
.
- References:
- shouldn't http::formatQuery be slightly modified
- From: Gerhard Hintermayer
- shouldn't http::formatQuery be slightly modified
- Prev by Date: Comparing two files line by line
- Next by Date: Re: Comparing two files line by line
- Previous by thread: Re: shouldn't http::formatQuery be slightly modified
- Next by thread: Tcl Dll problem
- Index(es):