Changeset 1661

Show
Ignore:
Timestamp:
09/04/06 21:26:03
Author:
miyagawa
Message:

StripRSSAd: deal with Bloglines content body update. Filter::BloglinesContentNormalize?: strip 

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/assets/plugins/Filter-StripRSSAd/google_adsense2.pat

    r1594 r1661  
    1 <table .*?>\s*(?:<tr>\s*<td><(?:defanged-)?span.*?> <br.*?></(?:defanged-)?span></td>\s*</tr>\s*)?<tr>\s*<td><a href="http://imageads\.googleadservices\.com/pagead/imgclick/.*?">\n<img .*? src="http://imageads\.googleadservices\.com/pagead/ads\?.*?" / ?></a></td>\s*</tr>\s*<tr>\s*<td><div align="right">(?:<font [^>]*>)?<a href="http://www\.google\.com/ads_by_google\.html".*?>Ads by Google</a>(?:</font>)?</div></td>\n\s*</tr>\s*</table> 
     1<table .*?>\s*(?:<tr>\s*<td>(?:<span.*?>)? <br.*?>(?:</span>)?</td>\s*</tr>\s*)?<tr>\s*<td><a href="http://imageads\.googleadservices\.com/pagead/imgclick/.*?">\n<img .*? src="http://imageads\.googleadservices\.com/pagead/ads\?.*?" */ ?></a></td>\s*</tr>\s*<tr>\s*<td><div align="right">(?:<font [^>]*>)?<a href="http://www\.google\.com/ads_by_google\.html".*?>Ads by Google</a>(?:</font>)?</div></td>\n\s*</tr>\s*</table> 
  • trunk/plagger/lib/Plagger/Plugin/Filter/BloglinesContentNormalize.pm

    r604 r1661  
    1717 
    1818    my $body = $args->{entry}->body; 
    19     if (my $c = $body =~ s!$Pattern!!g) { 
     19    my $c  = $body =~ s!$Pattern!!g; 
     20       $c += $body =~ s!&#13;!!g; 
     21    if ($c) { 
    2022        $context->log(info => "Stripped Bloglines extra attributes on " . $args->{entry}->link); 
    2123        $args->{entry}->body($body);