[Zope] Preserve HTML tags, such as , 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 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 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 95616Fax: (530) 752-8894 ___ 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 )
[Zope] Remove/Ignore and other HTML tags
I am a system administrator who maintains our Zope servers. I don't know that much about python or zope, just enough to upgrade and trouble shooting from time to time. Of course, the developers who have developed the system are no longer here. I try to move a site from Zope 2.7.4 (python 2.4) to a new server with Zope 2.9.4 (python 2.4.3), after some struggle, I have fixed most of the problems, but one that I don't have much clue. I hope that expert here can shed some light for me. Here are section of code that displays part the of some abstract The function get_abstract_sample is here for object in container.research.objectValues(): a = object.getId() if (a == name): text = object.research_description_html.read() else: pass text = str(text) return text[0:400] + '...' The above code work fine for the 2.7.4 server, but fails for 2.9.4 server, it will ask for authentication password for 2.9.4, no user/password combination will work. If I modify it as follows (for 2.9.4 server) for object in container.research.objectValues(): a = object.getId() if (a == name): text = object.research_description_html text = str(text) return text[0:400] + '...' Getting rid of read() for the 2.9.4 server solve the authentication problem and display the web page but with some unpleasant and other HTML tags literally (It doesn't for the old 2.7.4 server). I would love to hear suggestions and advices from this group to get rid of the literal and other HTML tags. Thank you very much for your help. Thank you very much for your attention. Zhi-Wei Lu Institue for Data Analysis and Visualization (IDAV) UC Davis Phone:(530) 752-0494 Davis, CA 95616Fax: (530) 752-8894 ___ 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 )
Re: [Zope] Re: Problem after upgrade zope from 2.6.0 -> 2.8.4
On Oct 27, 2005, at 11:55 PM, Alexander Limi wrote: On Thu, 27 Oct 2005 23:27:22 -0700, Tino Wildenhain <[EMAIL PROTECTED]> wrote: I fail to see how the zope could possibly influence the rendering of the very same HTML in a browser. Zope used to specify border=0 on images, put the title of the object in the alt tags of the image and other bad behaviour. Now it doesn't anymore. Most likely he needs to add the CSS: img { border: none; } This solves the problem. Apparently, the default behavior of the zope (2.6.0 <-> 2.8.4) has changed. Thank you all for your great input. Zhi-Wei Lu Institue for Data Analysis and Visualization (IDAV) UC Davis Phone:(530) 752-0494 Davis, CA 95616Fax: (530) 752-8894 ___ 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 )
[Zope] Problem after upgrade zope from 2.6.0 -> 2.8.4
Hi Zope Gurus, After I upgraded the zope from 2.6.0 -> 2.8.4 on a Redhat EL3 server, with python 2.4.2 (and I also tested with python 2.3.5), the gif pictures are now slightly misaligned a little bit, these graphics are in a TABLE with BORDER=0, CELLPADDING=0, and CELLSPACING=0. The graphics looked fine with Zope 2.6.0. Does anyone see similar behavior with Zope 2.8.4? Thank you for help. Zhi-Wei Lu Institue for Data Analysis and Visualization (IDAV) UC Davis Phone:(530) 752-0494 Davis, CA 95616Fax: (530) 752-8894 ___ 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 )