Subject: | [ ] in text |
Date: | Fri, 05 Oct 2012 17:25:40 +0100 |
To: | bug-XML-RSSLite [...] rt.cpan.org |
From: | Tony Firshman <tony [...] firshman.co.uk> |
This may *not* be a bug.
I used in perl:
use XML::RSSLite;
http://feeds.feedburner.com/lohudblogs/polhudson?format=xml
(attached)
has:
---------------
<content:encoded><![CDATA[Moody’s Investment Services maintained
Westchester County’s Aaa bond rating, but gave the state’s
third largest county a negative outlook, saying it reflects the
county’s structural imbalance “in prior years.” The
rating was on the county’s $987.7 million of general obligation
debt and upcoming bond sales. “The negative outlook reflects the
county’s structural imbalance in prior [...]<br/>
<br/>
Click on the headline for the rest of this blog post ...<img
src="http://feeds.feedburner.com/~r/lohudblogs/polhudson/~4/cI3-K40d3n4"
height="1" width="1"/>]]>
-----------------
and results in:
Unmatched [ in regex; marked by <-- HERE in m/br|img|![ <-- HERE
CDATA[Moody’s/ at /usr/share/perl5/XML/RSSLite.pm line 267.
Is this bad rss - ie should they encode all square brackets?
... or is your code at fault?
I think these square brackets only cause issues in CDATA[ sections which
are always terminated by ']]'. My own code parses this RSS XML OK, but
I thought I ought to go for a *proper* module!
---------------------------------
From /usr/share/perl5/XML/RSSLite.pm
$VERSION = 0.15;
---------------------------------
tony@article64:~/n$ perl -v
This is perl 5, version 14, subversion 2 (v5.14.2) built for
x86_64-linux-gnu-thread-multi
(with 57 registered patches, see perl -V for more detail)
---------------------------------
tony@article64:~/n$ uname -a
Linux article64 3.2.0-1-amd64 #1 SMP Fri Feb 17 05:17:36 UTC 2012 x86_64
GNU/Linux
---------------------------------
Tony Firshman
--
tony@firshman.co.uk http://firshman.co.uk
Voice: +44(0)1442-828254 Fax: +44(0)1442-828255 Skype: tonyfirshman
TF Services, 29 Longfield Road, TRING, Herts, HP23 4DG
Message body not shown because it is not plain text.