And, at a complete guess, what do you reckon html2text does?
LOL *That* was what I was missing.! Believe me Obi Wan, I do read the code. At least every now and then. ;) Cheers, Ausum ----- Original Message ----- From: "Chris Withers" <chrisw@nipltd.com> To: "Ausum Studio" <ausum_studio@hotmail.com> Cc: <zope@zope.org> Sent: Tuesday, November 19, 2002 7:19 PM Subject: Re: [Zope] Strip-o-Gram 1.2 Released!
Ausum Studio wrote:
I just tried the following in a Python Script, as documented:
from stripogram import html2text, html2safehtml mylumpofdodgyhtml = """<a href="http://www.zope.org">test string</a>""" #a lump of dodgy html ;-) mylumpofcoolcleancollectedhtml = html2safehtml(mylumpofdodgyhtml,valid_tags=("b", "a", "i", "br", "p")) mylumpoftext = html2text(mylumpofcoolcleancollectedhtml) return mylumpoftext
...but the printed string is 'test string', stripped the tag 'a', when it's supossed to be valid.
Am I missing something?
Now just what do you suppose the contents of mylumpoftext are supposed to be? ;-)
And, at a complete guess, what do you reckon html2text does?
Read The Code, Luke!
cheers,
Chris