Changeset 1620

Show
Ignore:
Timestamp:
08/29/06 01:39:46
Author:
miyagawa
Message:

backout the call to utf8::decode in strip_html function. FeedParser? now set $XML::Atom::ForceUnicode? = 1 globally rather than local(), since this flag takes effect during the runtime access to $entry->body or other elements when XML::Atom accesses its DOM node. Nasty.

Files:

Legend:

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

    r1492 r1620  
    33 
    44use Feed::Find; 
     5use XML::Atom; 
    56use XML::Feed; 
    67use XML::Feed::RSS; 
    78$XML::Feed::RSS::PREFERRED_PARSER = "XML::RSS::LibXML"; 
     9$XML::Atom::ForceUnicode = 1; 
    810 
    911use Plagger::Util; 
     
    2022    } 
    2123 
    22     local $XML::Atom::ForceUnicode = 1; 
    2324    my $remote = eval { XML::Feed->parse($content_ref) } 
    2425        or Carp::croak("Parsing content failed: " . ($@ || XML::Feed->errstr)); 
  • branches/hackathon-summary/plagger/lib/Plagger/Util.pm

    r1618 r1620  
    2828sub strip_html { 
    2929    my $html = shift; 
    30     utf8::decode($html); 
    3130 
    3231    eval {