20 Nov
2002
20 Nov
'02
12:19 a.m.
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