Tests to ensure that the double-encoding bug fix works.
Dave Cross [Sun, 24 Apr 2011 14:07:53 +0000 (15:07 +0100)]
MANIFEST
MANIFEST.SKIP
t/18-double2.t
t/samples/rss20-double.xml

index f963f13..bdbb922 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -31,7 +31,8 @@ t/13-category-hash-bug.t
 t/14-enclosures.t
 t/14-multi-enclosures.t
 t/15-odd-date.t
-t/16-convert.t
+t/17-double.t
+t/18-double2.t
 t/pod-coverage.t
 t/pod.t
 t/samples/atom-10-example.xml
@@ -43,13 +44,15 @@ t/samples/atom.xml
 t/samples/base_atom.xml
 t/samples/base_rss.xml
 t/samples/category-bug.xml
-t/samples/rss10-davorg-journal.xml
+t/samples/rss10-double.xml
 t/samples/rss10-invalid-date.xml
 t/samples/rss10-odd-date.xml
 t/samples/rss10.xml
+t/samples/rss20-double.xml
 t/samples/rss20-enclosure.xml
 t/samples/rss20-multi-enclosure.xml
 t/samples/rss20-no-summary.xml
 t/samples/rss20.xml
 t/samples/rss-multiple-categories.xml
 t/samples/rss-multiple-subjects.xml
+Makefile.PL
index ec70755..20e8b00 100644 (file)
@@ -5,3 +5,4 @@ _build
 Build
 blib
 Makefile
+^MYMETA.yml$
index b992d82..46da263 100644 (file)
@@ -35,7 +35,7 @@ use File::Spec;
 
     # TEST
     like($rss_content->body, 
-         qr{\A\Q<div class='snap_preview'><br /><p style="text-align:justify;"><span style="color:#000000;">In an interesting, not to say quixotic},
+         qr{\Q<a href="http://search.cpan.org/perldoc?Dancer">Dancer</a>},
          'Contains HTML tags');
 
     unlike($rss->as_xml, qr{&amp;lt;}, 'No double encoding');
@@ -63,7 +63,7 @@ use File::Spec;
 
     # TEST
     like($atom_content->body, 
-        qr{\A\Q&lt;div class=&#39;snap_preview&#39;&gt;&lt;br /&gt;&lt;p style=&quot;text-align:justify;&quot;&gt;&lt;span style=&quot;color:#000000;&quot;&gt;In an interesting, not to say quixotic},
+        qr{\Q<a href="http://search.cpan.org/perldoc?Dancer">Dancer</a>},
         'Contains HTML tags');
 
     unlike($atom->as_xml, qr{&amp;lt;}, 'No double encoding');
index 37bc1c5..c9f9989 100644 (file)
@@ -1,52 +1,30 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
-
-<channel>
-<title>David Jones, MP</title>
-
-<link>http://davidjonesblog.com</link>
-<description>Conservative Member of Parliament for Clwyd West; Shadow Minister for Wales</description>
-<lastBuildDate>Sat, 10 Oct 2009 14:44:32 +0000</lastBuildDate>
-<generator>http://wordpress.com/</generator>
-<language>en</language>
-<sy:updatePeriod>hourly</sy:updatePeriod>
-<sy:updateFrequency>1</sy:updateFrequency>
-<cloud domain="davidjonesblog.com" port="80" path="/?rsscloud=notify" registerProcedure="" protocol="http-post" />
-<image>
-<url>http://www.gravatar.com/blavatar/a828c934fa71b769302493ee214f134d?s=96&amp;d=http://s.wordpress.com/i/buttonw-com.png</url>
-<title>David Jones, MP</title>
-<link>http://davidjonesblog.com</link>
-</image>
-<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/wordpress/GWIK" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
-<title>Sunny Gordon</title>
-<link>http://feedproxy.google.com/~r/wordpress/GWIK/~3/YVku-jKELKs/</link>
-<comments>http://davidjonesblog.com/2009/10/10/sunny-gordon/#comments</comments>
-<pubDate>Sat, 10 Oct 2009 11:57:47 +0000</pubDate>
-<dc:creator>David Jones</dc:creator>
-<category><![CDATA[Conservative Party]]></category>
-<category><![CDATA[Gordon Brown]]></category>
-<category><![CDATA[Labour Party]]></category>
-<category><![CDATA[economy]]></category>
-<category><![CDATA[Politics]]></category>
-
-<guid isPermaLink="false">http://davidjonesblog.com/?p=4022</guid>
-<description><![CDATA[With Gordon at the helm, Labour are going to let the good times roll.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidjonesblog.com&blog=5996455&post=4022&subd=davidjonesmp&ref=&feed=1" />]]></description>
-<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;"><span style="color:#000000;">In an interesting, not to say quixotic, attempt at repositioning, Gordon Brown, in an interview Â in the <em><a href="http://www.telegraph.co.uk/news/newstopics/politics/gordon-brown/6286070/Britains-economy-ready-to-bounce-back-says-Gordon-Brown.html">Telegraph</a></em> this morning, seeks to portray himself as a sunny optimist, in contrast to the doom-and-gloom mongers of the Conservative party.</span></p>
-<p style="text-align:justify;"><span style="color:#000000;">It is â\80\9csimply not trueâ\80\9d, says Mr Brown, that tough economic times lie ahead.  No, says the PM, his drive for economic growth will pull the country out of recession; with Gordon at the helm, Labour are going to let the good times roll.</span></p>
-<p style="text-align:justify;"><span style="color:#000000;">Gratifying as it is to see this hitherto unsuspected Louis Armstrong side to the Prime Ministerâ\80\99s personality, it is unlikely that his new line will cut much ice with an informed electorate.  The Treasuryâ\80\99s own figures indicate that:</span></p>
-<ul style="text-align:justify;">
-<li><span style="color:#000000;">the social security bill will mount to almost Â£200 billion in four yearsâ\80\99 time â\80\93 almost twice the NHS budget;</span></li>
-<li><span style="color:#000000;">debt interest will rise to Â£63 billion per annum;</span></li>
-<li><span style="color:#000000;">the total cost of welfare and debt maintenance will amount to one-third of government expenditure.</span></li>
-</ul>
-<p style="text-align:justify;"><span style="color:#000000;">In the circumstances, itâ\80\99s rather hard to see that the Tories are being anything other than totally realistic when they warn of hard years to come.   Giving a cheery whistle, as Gordon appears to be advising, isnâ\80\99t really going to help an awful lot.</span></p>
-Posted in Conservative Party, economy, Gordon Brown, Labour Party Tagged: Politics <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davidjonesmp.wordpress.com/4022/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davidjonesmp.wordpress.com/4022/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davidjonesmp.wordpress.com/4022/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davidjonesmp.wordpress.com/4022/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davidjonesmp.wordpress.com/4022/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davidjonesmp.wordpress.com/4022/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davidjonesmp.wordpress.com/4022/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davidjonesmp.wordpress.com/4022/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davidjonesmp.wordpress.com/4022/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davidjonesmp.wordpress.com/4022/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davidjonesblog.com&blog=5996455&post=4022&subd=davidjonesmp&ref=&feed=1" /></div>]]></content:encoded>
-<wfw:commentRss>http://davidjonesblog.com/2009/10/10/sunny-gordon/feed/</wfw:commentRss>
-<slash:comments>1</slash:comments>
-
-<media:content url="http://0.gravatar.com/avatar/aea1b4a642b604d87d34047223aab73b?s=96&amp;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&amp;r=G" medium="image">
-<media:title type="html">David Jones MP</media:title>
-</media:content>
-<feedburner:origLink>http://davidjonesblog.com/2009/10/10/sunny-gordon/</feedburner:origLink></item>
-</channel>
-</rss>
+<?xml version='1.0' encoding='UTF-8'?>
+<rss xmlns:atom='http://www.w3.org/2005/Atom'
+     xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'
+     xmlns:georss='http://www.georss.org/georss'
+     xmlns:thr='http://purl.org/syndication/thread/1.0'
+     version='2.0'>
+  <channel>
+    <atom:id>tag:blogger.com,1999:blog-5910101498857524639</atom:id>
+    <lastBuildDate>Sun, 24 Apr 2011 08:19:48 +0000</lastBuildDate>
+    <title>Perl for president</title>
+    <description>our $blog = new Nice::Perl;</description>
+    <link>http://niceperl.blogspot.com/</link>
+    <managingEditor>noreply@blogger.com (prz)</managingEditor>
+    <generator>Blogger</generator>
+    <openSearch:totalResults>25</openSearch:totalResults>
+    <openSearch:startIndex>1</openSearch:startIndex>
+    <openSearch:itemsPerPage>25</openSearch:itemsPerPage>
+    <item>
+      <guid isPermaLink='false'>tag:blogger.com,1999:blog-5910101498857524639.post-5795437297335601353</guid>
+      <pubDate>Sun, 24 Apr 2011 08:08:00 +0000</pubDate>
+      <atom:updated>2011-04-24T10:19:48.222+02:00</atom:updated>
+      <category domain='http://www.blogger.com/atom/ns#'>perl dancer cpan</category>
+      <title>CPAN Module review - Web apps</title>
+      <description>When I'm developing web applications, I use those frameworks that make my work easier. The size of the webs is not big and I have been working with &lt;a href="http://search.cpan.org/perldoc?CGI::Application"&gt;CGI::Application&lt;/a&gt; for years. In a recent search, I have found &lt;a href="http://search.cpan.org/perldoc?Dancer"&gt;Dancer&lt;/a&gt;. This framework handles the routes concept (an idea from &lt;a href="http://www.sinatrarb.com/"&gt;Ruby's Sinatra&lt;/a&gt;); routes are paths which are binded to code. For example:&lt;br /&gt;&lt;br /&gt;&lt;table bgcolor="#f0f0f0" border="1" cellpadding="7" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;get&lt;/b&gt; '/home' =&amp;gt; &lt;b&gt;sub&lt;/b&gt; { 'Hi, this is home!' };&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;There are a lot of plugins available (database, logging, session handling, REST, AJAX, validation, templates, WebSocket, ...) at CPAN. You can write your own plugin by subclassing &lt;a href="http://search.cpan.org/perldoc?Dancer::Plugin"&gt;Dancer::Plugin&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The framework comes with a script that builds the skeleton of your application, with a nice structure in folders: views, libs, ... it takes seconds to start a new application.&lt;br /&gt;&lt;br /&gt;I &amp;nbsp;definitely recommend &lt;a href="http://search.cpan.org/perldoc?Dancer"&gt;Dancer&lt;/a&gt; to you. Just install and try!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5910101498857524639-5795437297335601353?l=niceperl.blogspot.com' alt='' /&gt;&lt;/div&gt;</description>
+      <link>http://niceperl.blogspot.com/2011/04/cpan-module-review-web-apps.html</link>
+      <author>noreply@blogger.com (prz)</author>
+      <thr:total>0</thr:total>
+    </item>
+  </channel>
+</rss>
\ No newline at end of file