[Zope3-dev] Add form URL quoting

Shane Hathaway shane at hathawaymix.org
Wed Dec 1 11:04:41 EST 2004


This message is in reply to:

http://mail.zope.org/pipermail/zope3-checkins/2004-November/023738.html

(It's hard to reply if you don't CC me.)

We seem to be in a rather sticky situation on the add form.  In Firefox
running in Linux, the add form didn't work if the form's URL had an "="
character.  It broke because Zope was quoting the URL, then the browser
quoted the URL again before sending it to the server.  By the time the
view code saw it again, the URL was quoted one too many times.  URLs came
out like this:

http://localhost:8080/mywiki/+/AddWikiPage.html%3Dfoo

So I changed Zope to unencode the URL before putting it in the form's
action attribute.  However, Bjorn rightfully pointed out that '?' no
longer works in object names (it's interpreted as the beginning of a query
string).  '%' is also broken.

I can think of a few convoluted workarounds, but is there a better way to
approach this?

Shane




More information about the Zope3-dev mailing list