[Zope] strip HTML-Tags
Florian Fahrbach
florian_fahrbach@gmx.de
Thu, 31 Jan 2002 17:29:46 +0100 (MET)
Hi,
I hope that somebody has a solution for my problem: I need to strip
Html-Tags from a text in ZOPE which I want so send via E-Mail. I pass the text as a
variable to a python script which looks like this:
import re
strip_html_pattern = re.compile(r'<[^>]*>')
plaintext = strip_html_pattern.sub('',text)
return plaintext
But it doesn't work. The script asks for password and username, although it
has the "manager"-role. Does anybody know a way that works? Perhaps there is
a less difficult way of doing this (I tried to strip the tags in the
dtml-document directly, but it didn't work also).
Greetings
F. Fahrbach
--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net