RE: [Zope] encoding strings for CGI
Simple. To URL encode "foo", just do: <!--#var foo url_quote--> -- Alexander Staubo http://www.mop.no/~alex/ "What the hell, he thought, you're only young once, and threw himself out of the window. That would at least keep the element of surprise on his side." --Douglas Adams, _The Hitchhiker's Guide to the Galaxy_
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Graham Chiu Sent: 13. juni 1999 07:51 To: zope@zope.org Subject: [Zope] encoding strings for CGI
I have a query which produces a table whereby I wish to click on each cell, and drill down further to another report.
The relevant string is
<td><a href=showClassReport?manu=<!--#var MANUFACTURER null=""--
&SUBMIT=Submit+Query><!--#var MANUFACTURER null=""--></a></td>
but it fails if Manufacturer has a space in it.
Is there a DTML method of CGI encoding Manufacturer?
------- Regards, Graham Chiu gchiu<at>compkarori.co.nz
_______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope
(For developer-specific issues, use the companion list, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
In article <B059671903C6D211A0D500C0F0301C7910C880@kubrick.mop.no>, Alexander Staubo <alex@mop.no> writes
Simple. To URL encode "foo", just do:
<!--#var foo url_quote-->
Thanks. I just found it after having tried html_quote. ------- Regards, Graham Chiu gchiu<at>compkarori.co.nz
Alexander Staubo wrote Simple. To URL encode "foo", just do:
<!--#var foo url_quote-->
Note that this won't quote the / character, though - I'm not sure what the best way to handle that is (yes, it's something that's bitten me before). Anthony.
participants (3)
-
Alexander Staubo -
Anthony Baxter -
Graham Chiu