Roundup Tracker - Issues

Message1166

Author richard
Recipients
Date 2004-04-06.22:11:49
Message-id
In-reply-to
Logged In: YES 
user_id=6405

Oops, sorry, forgot to leave a comment here when I last visited the 
issue. 
 
I've added quoting methods to the "utils" object in the TALES 
namespace. That means: 
 
url_quote       quote some text as safe for a URL (ie. space, %, ...) 
html_quote      quote some text as safe in HTML (ie. <, >, ...) 
 
You use these as "python:utils.url_quote(file.name)". 
 
To get the benefit of these methods without running CVS HEAD, add this 
to your tracker's interfaces.py TemplatingUtils class: 
 
    def url_quote(self, url): 
        '''URL-quote the supplied text.''' 
        import urllib 
        return urllib.quote(url) 
 
    def html_quote(self, html): 
        '''HTML-quote the supplied text.''' 
        import cgi 
        return cgi.escape(url) 
 
History
Date User Action Args
2009-02-03 14:20:38adminlinkissue927745 messages
2009-02-03 14:20:38admincreate