Preserve HTML tags, such as <P>, not into < P> in python code for Zope 2.9.4
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
--On 2. November 2006 11:59:34 -0800 Zhi-Wei Lu <zwlu@ucdavis.edu> wrote:
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.
what is 'research[name]' for a type? Same for 'research_description_html'? How can this be reproduced. You must provide some reasonable information in order to get help. -aj
participants (2)
-
Andreas Jung -
Zhi-Wei Lu