Changeset 1212

Show
Ignore:
Timestamp:
08/07/06 16:00:24
Author:
miyagawa
Message:

Hacked Publish::Feed to bypass XML::Feed type="text/html" to support html/xhtml automatically by XML::Atom::Content magic.

Files:

Legend:

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

    r1211 r1212  
    6262        $entry->link($e->link); 
    6363        $entry->summary($e->body_text) if defined $e->body; 
    64         $entry->content( XML::Feed::Content->new({ body => $e->body, type => 'xhtml' }) ) 
    65             if $self->conf->{full_content} && defined $e->body; 
     64 
     65        # hack to bypass XML::Feed Atom 0.3 crufts (type="text/html") 
     66        if ($self->conf->{full_content} && defined $e->body) { 
     67            if ($feed_format eq 'RSS') { 
     68                $entry->content($e->body); 
     69            } else { 
     70                $entry->{entry}->content($e->body); 
     71            } 
     72        } 
     73 
    6674        $entry->category(join(' ', @{$e->tags})); 
    6775        $entry->issued($e->date)   if $e->date;