Skip Menu |

This queue is for tickets about the XML-RSSLite CPAN distribution.

Report information
The Basics
Id: 49408
Status: resolved
Priority: 0/
Queue: XML-RSSLite

People
Owner: jpierce [...] cpan.org
Requestors: frequency [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.11
Fixed in: (no value)



Subject: Link beginning with newline
Hi there: I'm forwarding this on behalf of a Debian user, who has provided the attached foo.pl for your perusal. The original text of the bug (which follows) can be found at: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=442804 Running "perl foo.pl" on the program below prints http://foo.org/ http://foo.org/bar.html where I hoped it would give the second line only. The link in the item starts with a newline, and I suspect the munging within rsslite has decided it's text or something so the feed link should be added. The way rsslite fixes up fields is a good thing, but in this case I think the fix should be to strip leading whitespace. I don't know if leading whitespace is valid rss, I saw it in a feed http://www.coastalwatch.com/rss/cwreports_330.xml
Subject: foo.pl
use strict; use XML::RSSLite; my %feed; my $xml = '<?xml version="1.0"?> <rss version="2.0"> <channel> <link>http://foo.org</link> <item> <link> http://foo.org/bar.html</link> </item> </channel> </rss> '; parseRSS(\%feed, \$xml); print $feed{'item'}->{'link'};
Subject: Re: [rt.cpan.org #49408] Link beginning with newline
Date: Thu, 03 Sep 2009 16:13:06 -0400
To: bug-XML-RSSLite [...] rt.cpan.org
From: Jerrad Pierce <belg4mit [...] pthbb.org>
Hello, It's not a matter of RSS specification, but XML. And tag contants are tag contents (newlines and all) in XML. I'll look into adding this edge case to the munging. -- Free map of local environmental resources: http://CambridgeMA.GreenMap.org -- MOTD on Sweetmorn, the 27th of Bureaucracy, in the YOLD 3175: The man who makes no mistakes does not usually make anything.
Should be fixed in 0.15 FYI the "extra" link at the beginning was from the code thinking that it was a relative URI and appending it to the channel's URI.