Commits

Anonymous committed dc2e942

Eliminated the extraneous <html>|<body>|etc. tags and fixed the unicode
problems in Atom.

  • Participants
  • Parent commits db13775

Comments (0)

Files changed (1)

File XML-Grammar-Fortune/module/bin/web-feed-syndicate.pl

 use strict;
 use warnings;
 
+use XML::LibXML;
+use XML::Atom;
+use DateTime::Format::W3CDTF;
 
-use XML::LibXML;
-use DateTime::Format::W3CDTF;
+# Otherwise we get wrong unicode.
+$XML::Atom::ForceUnicode = 1;
 
 package XML::Grammar::Fortune::Synd::Heap::Elem;
 
                     }
                 );
 
+                $content =~ s{\A.*?<body>}{}ms;
+                $content =~ s{</body>.*\z}{}ms;
+
                 $entry->content(
                     XML::Feed::Content->new(
                         {