[ZPT] stripOgram tag attributes

Chris Withers chrisw@nipltd.com
Thu Apr 10 15:19:07 EDT 2003


Hi Tim,

Tim Cardinal wrote:
> 
> i'm working with stripOgram - no problems. But it seems to be impossible to
> allow valid tags without attributes.
> I mean something like this:
> -------
> from Products.stripogram import html2text, html2safehtml
> myResult=html2safehtml(data,valid_tags=('table':{'*':None},'tr'))
> 
> return myResult

What happens if you just use:
myResult=html2safehtml(data,valid_tags=('table,'tr'))

The syntax you use isn't supported by stripogram, should it be?

> Is there anywhere a possibility to use a syntax to define allowed or
> forbidden tag-attributes?

Hmmm... nope, but it's an interesting idea...

Can you suggest how it'd work?

cheers,

Chris

PS: This isn't much to do with ZPT, I wonder what would be the most appropriate 
list?





More information about the ZPT mailing list