HTML filtering

Tim Hicks tim.hicks at iname.com
Fri May 3 05:59:31 EDT 2002


"Stuart D. Gathman" <stuart at bmsi.com> wrote in message
news:01Xz8.21629$YQ1.8012127 at typhoon.southeast.rr.com...
> I need to filter HTML to remove certain constructs (e.g. <script ...> ...
> </script>).  I am trying to use the batteries.  The htmllib module helps
> with the parsing, but it seems like a lot of work to create a formatter
> that passes everything (except script) through in HTML syntax - espicially
> trying to preserve original syntax.  Am I missing something?  Is there
> another module I should be using for filtering HTML?  Perhaps one of
> those ad stripping filters written in python would provide a usable
> example?

I think http://www.zope.org/Members/chrisw/StripOGram/ probably does what
you want.

tim





More information about the Python-list mailing list