[Zope] More tolerant Stripogram (solution)

Jaroslav Lukesh lukesh at seznam.cz
Mon May 2 04:18:02 EDT 2005


Dne pondělí, 2. května 2005 09:52 Tino Wildenhain <tino at wildenhain.de> 
napsal(a):
> Am Montag, den 02.05.2005, 09:04 +0200 schrieb Jaroslav Lukesh:
> > Hi all,
> >
> > I was extend SquishDot with wysiwyg editor (origin: vsbabu ieeditor). But
> > it was not accept many tags due too small number of allowed html
> > attributes in stripogram.

> Looks like you completely defait the purpose of the stripping ;)

Not so much, because you need to call which tags are allowed, if you does not 
specify them, it is not allowed. Sou you are more free if you need to use 
multiple kinds of stripping.

One less-restrictive face should be to away 'html' and 'body'. Another 
extra-restrictive face will allow only 'br' and 'p' for example. And you 
should mix that both faces of stripping at single page.

> Some people will especially like those <iframe> tags :)

You need to define allowed tags. So if you does not define 'iframe', it will 
be anihilated:

return strip(html2safehtml(text,self.getProperty('valid_tags',('b', 'a', 'i', 
'br', 'p', 'h3', 'ul', 'li', 'font', 'br'))))

> Maybe you should also visit w3c for information about up-to-date HTML.

It was need to be done quickly, it was no time to browse via slow saturated 
line, so I used which I was on the desk.

-- 

                        Jaroslav Lukesh
  -----------------------------------------------------------
  This e-mail can not contain any viruses because I use Linux



More information about the Zope mailing list