Changeset 747

Show
Ignore:
Timestamp:
05/15/06 19:16:01
Author:
miyagawa
Message:

don't add enclosures without URL

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/lib/Plagger/Plugin/Publish/Feed.pm

    r732 r747  
    5959        $entry->author($e->author); 
    6060 
    61         # RSS 2.0 by spec doesn't allow multiple enclosures 
    6261        if ($e->has_enclosure) { 
     62            # RSS 2.0 by spec doesn't allow multiple enclosures 
    6363            my @enclosures = $feed_format eq 'RSS' ? ($e->enclosures->[0]) : $e->enclosures; 
    64             for my $enclosure (@enclosures) { 
     64            for my $enclosure (grep defined $_->url, @enclosures) { 
    6565                $entry->add_enclosure({ 
    6666                    url    => $enclosure->url,