[Zope] Strip-o-Gram 1.2 Released!
Chris Withers
chrisw@nipltd.com
Wed, 20 Nov 2002 00:19:34 +0000
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