[Email-SIG] A suggestion: HTML stripping

Barry Warsaw barry at python.org
Fri Nov 21 10:19:30 EST 2003


I had a suggestion from a happy email package user that I thought might
be interesting to consider.  He was using email as a replacement for the
Perl demime thingie.  He was generally happy about what email allowed
him to do, except for one thing.  He was using a DecodedGenerator but
wanted to strip text/html parts of its tags, leaving just plain text.

In Mailman, I actually call out to something like lynx to render
text/html into plain text, but I think he wanted something simpler.  He
just wanted to rip out all the tags, and ended up using an HTMLParser
class to do this.

Something to think about for email 3.0.

-Barry





More information about the Email-SIG mailing list