Changeset 1547

Show
Ignore:
Timestamp:
08/20/06 23:12:59
Author:
miyagawa
Message:

fixed UTF-8 corruption in test suite.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/hackathon-summary/plagger/lib/Plagger/Plugin/Summary/Auto.pm

    r1539 r1547  
    1717 
    1818    if ($args->{entry}->body && !$args->{entry}->summary) { 
    19         my $summary = Plagger::Util::summarize($args->{entry}->body); 
     19        # give plugins a chance 
     20        my $summary = $context->run_hook_once('summarizer.summarize', $args); 
     21        unless (defined $summary) { 
     22            $summary = Plagger::Util::summarize($args->{entry}->body); 
     23        } 
    2024        $args->{entry}->summary($summary); 
    2125    } 
  • branches/hackathon-summary/plagger/lib/Plagger/Util.pm

    r1546 r1547  
    4040    } 
    4141 
    42     Encode::_utf8_on($html); 
    4342    my $tree = HTML::TreeBuilder->new; 
    4443    $tree->parse($html); 
     
    209208    my($text) = @_; 
    210209    $text = Plagger::Text->new_from_text($text) unless ref $text; 
    211  
    212     # give plugins a chance 
    213     if (Plagger->context) { 
    214         my $summarized = Plagger->context->run_hook_once('summarizer.summarize', { text => $text }); 
    215         return $summarized if defined $summarized; 
    216     } 
    217210 
    218211    if ($text->is_html) { 
  • branches/hackathon-summary/plagger/t/core/plaintext.t

    r1544 r1547  
     1use utf8; 
    12use t::TestPlagger; 
    23use Plagger::Util; 
  • branches/hackathon-summary/plagger/t/plugins/Publish-Feed/fullcontent.t

    r1467 r1547  
    3232--- expected 
    3333file_doesnt_contain($main::output, qr/<a href=/); 
    34 file_contains($main::output, qr/for\s+http/s); 
     34file_contains($main::output, qr/for\s+(\*\s*)?http/s); 
    3535