Hi Zope Gurus,

During the server upgrade from Zope 2.7.4 to 2.9.4, I encountered
a problem for the following simple python script:

text = container.research[name].research_description_html
text = str(text)
return text[0:400] + '...'

This code suppose to return the first 400 characters of an
abstract, the abstract is in HTML.

However, this will return HTML tags such as <P> into
&lt;P&&gt;  in the calling routine. (Zope 2.7.4 doesn't do that)

But if I simply have the following code:

text = container.research[name].research_description_html
return text

It preserves the HTML tages such as <P> for zope 2.9.4.

I will be very glad to receive tips fix my problem.  I posted an
email a few weeks ago, I didn't quite grasp the problem (confused)

Thank you very much for your help.

Zhi-Wei Lu
Institue for Data Analysis and Visualization (IDAV)
UC Davis                     Phone:    (530) 752-0494
Davis, CA 95616        Fax:         (530) 752-8894

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to