On Jan 23, 2008 1:11 AM, Noah Tye <[EMAIL PROTECTED]> wrote:
>
> Is there a sane way to make url_for() convert spaces to underscores
> instead of plus signs?
Added to the Routes 2 spec. This has bitten me before, because I have
static files that actually do have spaces in the filename. I worked
around it by postprocessing the value.
url_for(...).replace("+", "%20")
Note that the "+" is correct in the query string, so the above works
only if there is no query string.
> (I don't quite feel like patching urllib.py.)
I think the bug is in Routes. routes.base.Route.generate() calls
routes.util._url_quote() for each path component, which does
urllib.quote_plus. It should do urllib.quote.
--
Mike Orr <[EMAIL PROTECTED]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---