[EMAIL PROTECTED] wrote:

> If I were implementing it, I would simply strip any tags, possibly 
> replacing some of them with their intended action, ie spaces and line 
> breaks.

I think you'd be better off filtering the HTML part through lynx -dump.
You can even do it with some fairly simple MIMEDefang code in filter:

sub filter {
    my($entity, $fname, $ext, $type) = @_;

    if (lc($type) eq 'text/html') {
        action_external_filter($entity, 'lynx -dump < FILTERINPUT > 
FILTEROUTPUT');
        $entity->head->replace('content-type', 'text/plain');
        $entity->head->replace('content-transfer-encoding', '8bit');
    }
}

Be aware that this will consume quite a bit of CPU power, and very likely
annoy the h*ll out of your users. :-)

Regards,

David.
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list [email protected]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to