That's the ticket. You're right
the CDATA solution is much better than html-quote'ing everything. Many thanks, -Jon Peter Bengtsson wrote: Create a python script called rssFormatter(text):: from Products.PythonScripts.standard import structured_text, html_quote return html_quote(structured_text(text))Which you use later as <dtml-var "rssFormatter(summary)"> I think for some of my RSS feeds I use CDATA, so _my_ rssFormatter() script looks something like this:: return "<![CDATA[%s]]>" % text The advantage with CDATA is that you won't need to html quote things. On 9/8/05, Jonathan Cyr <[EMAIL PROTECTED]> wrote:Hello, I can't seem to find this anywhere. I am constructing an RSS 2.0 feed for a zope app. I am creating the rss.xml file in a DTML method. One of the information elements I wish to include in the feed is a structured-text paragraph. To use any XHTML in a feed you must "html_quote" all of the extended characters for it to work. So I wish to do something like <dtml-var summary fmt="structured-text" html_quote> This obviously doesn't work, (would have been cool if it did tho). How do I access the structured text and html quote translation mechanisms in an expr tag. Something like <dtml-var expr="summary.structured_text().html_quote()"> Thanks in advance, still googling for it. -Jon ps- I don't use ZPT, DTML was chose a while back, and would rather keep the RSS in a DTML Method rather than a python script. The layers are getting pretty hairy, don't want to add indention to it -- Jonathan Cyr [EMAIL PROTECTED] _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) -- Jonathan Cyr [EMAIL PROTECTED] |
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )