Re: [Zope] URL quoting in python

2000-07-21 Thread Kapil Thangavelu
Thanks for the tip Duncan, I find it strange that this utility function is not in the _ namepace... time to make a trip to the Tracker. It seems like a url-encoding function should be directly accessible from zope. Thanks Kapil Duncan Booth wrote: > > > I often create an external method for t

Re: [Zope] URL quoting in python

2000-07-21 Thread Dieter Maurer
Chris Withers writes: > How about doing the equivalent on html_quote in python? from DocumentTemplate. import DT_Util def html_quote(str): return DT_Util.html_quote(str) Dieter ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman

RE: [Zope] URL quoting in python

2000-07-21 Thread Duncan Booth
> 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 f

RE: [Zope] URL quoting in python

2000-07-20 Thread Chris McDonough
> Didn't happen for me (Zope 2.2b4). I got > Invalid attribute name, "url_quote", for tag "REQUEST.set('URL', >URL2+'?action=Add Material > Info&product_number='+product_number)" url_quote>, > on line 195 of index_html > > It also fails for ... It looks like url_quote is > only appli

Re: [Zope] URL quoting in python

2000-07-20 Thread Chris Withers
[EMAIL PROTECTED] wrote: > > It also fails for ... It looks like url_quote is only applicable > to ...which is sort of painful. not really... how and what would you apply html_quote to in call and return (return is slightly easier) cheers, Chris ___

Re: [Zope] URL quoting in python

2000-07-20 Thread jpenny
On Thu, Jul 20, 2000 at 10:06:33AM +0100, Chris Withers wrote: > Kapil Thangavelu wrote: > > what i am trying to do > >

Re: [Zope] URL quoting in python

2000-07-20 Thread Chris Withers
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 t

RE: [Zope] URL quoting in python

2000-07-20 Thread Chris McDonough
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

Re: [Zope] URL quoting in python

2000-07-20 Thread Chris Withers
Kapil Thangavelu wrote: > what i am trying to do >