Re: [tclwebtest] HTML entities should be substituted in urls
Status: Abandoned
Brought to you by:
tils
From: Tilmann S. <ti...@ti...> - 2003-03-03 09:51:04
|
* Grzegorz Adam Hankiewicz <gr...@ef...> [20030225 15:30]: > Without the '&' our pages are invalid HTML. With it (and without > the commited patch) tclwebtest doesn't work on our servers. Maybe > using translate_entities is overkill because only a few have to be > replaced (IIRC >,< and &). Now I see what you mean - thanks for fixing this. Regarding the overkill issue: given that url's are relatively short strings in most cases it propably doesn't really matter. The translate_entities proc could be made much more efficient by using [string map] instead of regexps - which would be more of a benefit for things like [response text] etc. though. > > but shouldn't links be URL-encoded instead - e.g. " " becomes > > %20 etc.? In my opinion this should be done automatically by > > the tcl http package, but it isn't done - just checked it. It > > is done automatically by a browser (checked it with Konqueror: > > http://localhost:9000/Some Url/ becomes "GET /Some%20Url/ > > HTTP/1.1"). > > AFAIK this is the standard escape sequence for ASCII characters > below 33 and over 126, and it's an additional substitution tclwebtest > could perform, though I still haven't been biten by this case. Ok, so this is unrelated and another item for the TODO list. cheers, Til -- http://tsinger.com |