Re: [Cheetahtemplate-discuss] nest #filter directives
Brought to you by:
rtyler,
tavis_rudd
From: Tavis R. <ta...@da...> - 2007-10-05 19:21:50
|
Hi Claudio, It nests them, but it doesn't chain them. The inner filter shadows=20 the outer one. You'd need to create a new filter that combines the=20 behaviour of both. See the Filters.py file for how to code a filter=20 class. Cheers, Tavis On Fri, 5 Oct 2007, Claudio Negri wrote: > Hi. > I've read in CHANGES that starting from 2.0rc1 it should be possible to n= est #filter directives. > > How does it work? Can you give me an example? > > I'm trying to output HTML with UTF-8 encoding. For example: > > ---------------------- > #encoding UTF-8 > <% > test=3Du"Test & =C3=B9" > %> > > #filter WebSafe > #filter EncodeUnicode > <h1>$test</h1> > #end filter > #end filter > ---------------------- > > & should be converted to & > =C3=B9 should be correctly encoded in UTF-8 > > > Thanks > Claudio Negri > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Cheetahtemplate-discuss mailing list > Che...@li... > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss > |