Your report as some strange elements in it. See below.... Jan-Oliver Wagner writes:
I just detected a serious bug: (in short: to my mind getattr() behaves wrong)
http://freegis.org/details.en.html?name=Geoprocessamento%3a%20Teoria%20e%20A...
was produced using <dtml-var name urlquote>. You should use "url_quote_plus".
Space (i.e. %20) is not allowed as part of the query string. It must be coded as '+'. Some browsers are serious about this restriction (e.g. IE 5.5).
(for those who don't have a browser at hand: the attribute is converted back to Geoprocessamento: Teoria e Aplicaçdetails.en.html5es which is obviously wrong) I used my browser (and Zope 2.3.3). It was converted to
Geoprocessamento: Teoria e Aplicações Precisely, what one would expect....
Manually using capital letters for the url quoting will work (ie. here just '%F5es' at the end of the above URL.
Apparantly the %f is substituted by someone by the filename (getattr already delivers this error). .... def unquote_name(self): request = getattr(self, 'REQUEST') if hasattr(request, 'name'): name = getattr(request, 'name') # name already now contains the "%f" substituted by # "details.en.html"!!! request.set('name', unquote(name)) return '' I am sure, "getattr" returns the value that is in "REQUEST" without substituting "%f" -- it did when I tried to reproduce your problem! Maybe, you display "REQUEST" before mangling:
<dtml-var REQUEST> <dtml-var unquote> <dtml-var REQUEST> Why do you want to unquote anyway? Zope already did it for you! Dangerous to do it a second time! Maybe, you want to read URL:http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html for details, how Zope processes parameters. Dieter