[Zope] How to filter unwanted strings within a form's textarea?

Oleg Broytmann Oleg Broytmann <phd@phd.fep.ru>
Thu, 12 Jul 2001 17:52:30 +0400 (MSD)


On Thu, 12 Jul 2001, Ausum wrote:
> I need my local users to create content using html tags within a
> textarea, but I don't want them to include links to external images
> resources.
>
> My idea is to enable a filter that looks for the
> "http://www.whatever_ext_site.com" string within the img tag, and then
> erase it before posting the whole form data to the proper method.
>
> Is there a simple way for doing this?
> (If not, what is the hard way? :)  )

   The hardway would be to parse html yourself using sgmllib and remove img
tags.

Oleg.
----
     Oleg Broytmann     http://www.zope.org/Members/phd/     phd@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.