<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000066">
<font size="-1"><font face="Verdana">That's the ticket.&nbsp; You're right
the CDATA solution is much better than html-quote'ing everything.<br>
<br>
Many thanks,<br>
<br>
-Jon<br>
</font></font><br>
Peter Bengtsson wrote:
<blockquote cite="midbc95c2800509071705186138d5@mail.gmail.com"
 type="cite">
  <pre wrap="">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 &lt;dtml-var "rssFormatter(summary)"&gt;

I think for some of my RSS feeds I use CDATA, so _my_ rssFormatter()
script looks something like this::

return "&lt;![CDATA[%s]]&gt;" % text

The advantage with CDATA is that you won't need to html quote things.


On 9/8/05, Jonathan Cyr <a class="moz-txt-link-rfc2396E" href="mailto:cyrj@cyr.info">&lt;cyrj@cyr.info&gt;</a> wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">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 &lt;dtml-var summary fmt="structured-text"
html_quote&gt;

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 &lt;dtml-var expr="summary.structured_text().html_quote()"&gt;

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
<a class="moz-txt-link-abbreviated" href="mailto:cyrj@cyr.info">cyrj@cyr.info</a>

_______________________________________________
Zope maillist  -  <a class="moz-txt-link-abbreviated" href="mailto:Zope@zope.org">Zope@zope.org</a>
<a class="moz-txt-link-freetext" href="http://mail.zope.org/mailman/listinfo/zope">http://mail.zope.org/mailman/listinfo/zope</a>
**   No cross posts or HTML encoding!  **
(Related lists -
 <a class="moz-txt-link-freetext" href="http://mail.zope.org/mailman/listinfo/zope-announce">http://mail.zope.org/mailman/listinfo/zope-announce</a>
 <a class="moz-txt-link-freetext" href="http://mail.zope.org/mailman/listinfo/zope-dev">http://mail.zope.org/mailman/listinfo/zope-dev</a> )

    </pre>
  </blockquote>
  <pre wrap=""><!---->

  </pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 
Jonathan Cyr
<a class="moz-txt-link-abbreviated" href="mailto:cyrj@cyr.info">cyrj@cyr.info</a></pre>
</body>
</html>