How about doing the equivalent on html_quote in python?

Chris

Chris McDonough wrote:
> 
> I often create an external method for this...
> 
> em:
> 
> def url_quote(s):
>    import urllib
>    return urllib.quote_plus(s, safe='')
> 
> Silly, but it works.
> 
> I think the alternative is to hack the DT_Util.py module in the
> DocumentTemplate directory to expose urllib or a derived function.
> 
> > -----Original Message-----
> > From: Kapil Thangavelu [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, July 19, 2000 11:46 PM
> > To: [EMAIL PROTECTED]
> > Subject: [Zope] URL quoting in python
> >
> >
> > is there a way to get a url-encoded/quoted variable in
> > pythonish dtml ?
> >
> > what i am trying to do
> > <dtml-call "RESPONSE.redirect(URL1+'?foo_bar='+foobar)">
> >
> >
> > Kapil
> >
> > _______________________________________________
> > Zope maillist  -  [EMAIL PROTECTED]
> > http://lists.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope-dev )
> >
> 
> _______________________________________________
> Zope maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to