Hello, all. I have a small mailing list whose entries I wish to archive on a website as soon as they come in. Here's the code I'm using at the moment:
my $entry; if ($mail->header("Content-Type") =~ /plain/) { logtext("Plain text. Marking up."); my $conv = new HTML::TextToHTML(); $entry = $conv->process_para($mail->body); } else { logtext("Not plain text. Scrubbing."); my $scrubber = HTML::Scrubber->new( allow => [ qw[ p b i u hr +br ] ] ); $entry = $scrubber->scrub($mail->body); }
This solution works pretty well for most mails (list members either send from Hotmail accounts or use plain text), but for HTML mails sent from Outlook Express it fails completely. I end up with '=3D' and '=20' at the end of every line. Should I write code to deal with this as a special case or has someone already solved this problem?
In reply to Sanitising email for posting on website by Jobby
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |