According to Jean-Sebastien Morisset: > I'm trying to use a restrict value with spaces - for example: > > restrict=/photos/021/Netherland%20Antilles/Bonaire/ > > Unfortunately, htdig v3.1.6 reads this as "/photos/021/Netherland" OR > "Antilles/Bonaire/" when I would like it to read it as a single string. > Is there a way to have it treat spaces as part of the string?
Spaces in file names will cause no end of grief at all sorts of levels, and if you have any control over the matter, it's always best to avoid them altogether as much as humanly possible. They cause problems with some browsers, many HTML code generators, some proxy servers (even when properly encoded), and of course in situations like the one you just discovered. If you must stick with spaces in names, then you have to be very clever (or tricky) to make sure they stay properly encoded up to the point where they're needed. In the case of a CGI input parameter, %xx hex encoding is decoded almost right away, as you've discovered, and so it won't match the URL which is still encoded, plus the space is taken as a separator, as you've also discovered. Have you tried an extra level of encoding, i.e. encoding %20 as %2520? In that way, the %25 in the CGI input parameter should decode as %, so you should be left with %20 in the "restrict" URL pattern. If that works, it would be a much better, and more logical solution, than hacking the code to try to preserve embedded spaces as spaces all along the way, as I can imagine this causing all sorts of other things to break in the future. -- Gilles R. Detillieux E-mail: <[EMAIL PROTECTED]> Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/ Dept. Physiology, U. of Manitoba Winnipeg, MB R3E 3J7 (Canada) ------------------------------------------------------- This SF. Net email is sponsored by: GoToMyPC GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free! https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl _______________________________________________ ht://Dig general mailing list: <[EMAIL PROTECTED]> ht://Dig FAQ: http://htdig.sourceforge.net/FAQ.html List information (subscribe/unsubscribe, etc.) https://lists.sourceforge.net/lists/listinfo/htdig-general

