[Zope] Preserve HTML tags, such as <P>, not into < P>
in python code for Zope 2.9.4
Zhi-Wei Lu
zwlu at ucdavis.edu
Thu Nov 2 14:59:34 EST 2006
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
<P&> 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)
then.
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
More information about the Zope
mailing list