Fix for <![CDATA[ ]]> tags in RSS feeds.

This commit is contained in:
Yung Han Khoe 2006-06-21 09:35:14 +00:00
parent 4f7dafc015
commit 8ac6f3a29c

View file

@ -290,6 +290,9 @@ sub _get_rss_data {
}
my $xml = $response->content();
# XML::RSSLite does not handle <![CDATA[ ]]> so:
$xml =~ s/<!\[CDATA\[(.*?)\]\]>/$1/sg;
# Convert encoding if needed / Perl 5.8.0 or up required.
if ($] >= 5.008 && $hasEncode) {
$xml =~ /<\?xml.*?encoding=['"](\S+)['"]/i;