Re: stripping body ads

2000-03-11 00:47:06
(note the list address is now mhonarc(_at_)ncsa(_dot_)uiuc(_dot_)edu)

On March 10, 2000 at 09:30, Wade VanBuskirk wrote:

I would like to strip out the ads which this list has added to the
message body. These are surrounded by comment tags in the original

<!-- begin ONElist Sponsor -->
...bla bla bla...
<!-- end ONElist Sponsor -->

<!-- begin banner runid: 2058 crid: 975 -->
...<img src>...
<!-- end banner -->

The comment tags are removed by mhonarc, but the content is left

You want to basically follow what Gunnar stated in his message.
The difference is that it appears you are refering to text/html
questions.  If this is the case, you can create a custom
version of that strips the ads, and register
it with the MIMEFILTERS resource (see MIMEFILTERS in the docs
for more information).  Something like the following at the
beginning of the filter should do it:

    $data =~ s/<!-- begin ONElist Sponsor.*?end ONElist Sponsor -->//g;
    $data =~ s/<!-- begin banner.*?end banner -->//g;

Note, if text/plain message have ads you want to strip, then
you will need to have a custom text/plain filter (you can use as a reference) to strip the ads.


<Prev in Thread] Current Thread [Next in Thread>