Paste unquote/unquote_plus Question

0 views
Skip to first unread message

jerry

unread,
May 14, 2008, 11:19:17 AM5/14/08
to pylons-discuss
Michi's post (http://groups.google.com/group/pylons-discuss/msg/
325fedbbd2bc8163) repackaged (Let's see if we can attract Ian's
attention :)

"""
I recently posted this message:

http://groups.google.com/group/pylons-discuss/msg/fa8507fbb7ea6173

I think the issue is webhelper uses quote_plus to encode url while
Paste uses unquote to decode url. So "1 + 1" gets encoded to "1+%2b+1"
and it gets decoded to "1+++1". Is there any particular reason Paste
doesn't use unquote_plus?

Thanks!
--Michi
"""

Jerry

michi

unread,
May 18, 2008, 11:51:10 AM5/18/08
to pylons-discuss
... and it's not webhelper, but it's routes.url_for function that does
the encoding.

Looking at the URI spec (rfc2396 section 2.4.1), it seems to me that
url_for function should encode the space character as "%20", not "+".

Sorry for the confusion,
--Michi
Reply all
Reply to author
Forward
0 new messages