fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2010-10-05 03:49 am

[dw-free] clean up error logs

[commit: http://hg.dwscoalition.org/dw-free/rev/a3517b21587c]

http://bugs.dwscoalition.org/show_bug.cgi?id=2812

Handle namespaces for tags (so <atom10:link... is handled along with
<link....)

Patch by [personal profile] kareila.

Files modified:
  • cgi-bin/LJ/ParseFeed.pm
--------------------------------------------------------------------------------
diff -r 658726fda070 -r a3517b21587c cgi-bin/LJ/ParseFeed.pm
--- a/cgi-bin/LJ/ParseFeed.pm	Mon Oct 04 19:21:41 2010 +0800
+++ b/cgi-bin/LJ/ParseFeed.pm	Tue Oct 05 11:49:20 2010 +0800
@@ -54,7 +54,9 @@ sub parse_feed
 
     if ( (defined $type && $type eq 'atom') || $content =~ m!\<feed!) {
         # try treating it as an atom feed
-        $parser = new XML::Parser(Style=>'Stream', Pkg=>'LJ::ParseFeed::Atom');
+        $parser = new XML::Parser( Style => 'Stream',
+                                   Namespaces => 1,
+                                   Pkg => 'LJ::ParseFeed::Atom' );
         return ("", "failed to create XML parser") unless $parser;
         eval {
             $parser->parse($content);
--------------------------------------------------------------------------------