I've recently been moved to a new hosting environment I don't have much control of. Previously I had an rss feed generated by XML::RSS 1.05 my new environment has XML::RSS 1.48 which has resulted in problems with my rss feed.
A minimal test case follows:
1.05 results as desireduse XML::RSS; my $rss = new XML::RSS (version => '1.0', encoding => "UTF-8"); $rss->channel(title => "Test", link => "http://example.com", description => "Test script", ); $rss->add_item(title => "Test", link => "http://example.com/2", description => "<i>Some HTML</i> Some text", ); $rss->{output} = '1.0'; print $rss->as_string;
1.48 results with undesired encoding<?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" > <channel rdf:about="http://example.com"> <title>Test</title> <link>http://example.com</link> <description>Test script</description> <items> <rdf:Seq> <rdf:li rdf:resource="http://example.com/2" /> </rdf:Seq> </items> </channel> <item rdf:about="http://example.com/2"> <title>Test</title> <link>http://example.com/2</link> <description><i>Some HTML</i> Some text</description> </item> </rdf:RDF>
<code> <?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" > <channel rdf:about="http://example.com"> <title>Test</title> <link>http://example.com</link> <description>Test script</description> <items> <rdf:Seq> <rdf:li rdf:resource="http://example.com/2" /> </rdf:Seq> </items> </channel> <item rdf:about="http://example.com/2"> <title>Test</title> <link>http://example.com/2</link> <description><i>Some HTML</i> Some text</descripti +on> </item> </rdf:RDF>
The key difference in the feed is the HTML portion:
Any help getting the 1.48 version to work as intended would be much appreciated, I'm having a difficult time figuring out what option I may need to switch to get it to output as intended.<description><i>Some HTML</i> Some text</description> vs <description><i>Some HTML</i> Some text</descripti +on>
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |