\r
require 'rss'\r
\r
+# Try to load rss/content/2.0 so we can access the data in <content:encoded> \r
+# tags.\r
+begin\r
+ require 'rss/content/2.0'\r
+rescue LoadError\r
+end\r
+\r
module ::RSS\r
\r
# Make an 'unique' ID for a given item, based on appropriate bot options\r
:a_href => :link_out\r
}\r
\r
- if item.respond_to? :description\r
- desc = item.description.ircify_html(desc_opt) if item.description\r
+ # We prefer content_encoded here as it tends to provide more html formatting \r
+ # for use with ircify_html.\r
+ if item.respond_to?(:content_encoded) && item.content_encoded\r
+ desc = item.content_encoded.ircify_html(desc_opt)\r
+ elsif item.respond_to?(:description) && item.description\r
+ desc = item.description.ircify_html(desc_opt)\r
else\r
if item.content.type == "html"\r
desc = item.content.content.ircify_html(desc_opt)\r