summaryrefslogtreecommitdiff
path: root/lib/feed2imap/channel.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/feed2imap/channel.rb')
-rw-r--r--lib/feed2imap/channel.rb14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/feed2imap/channel.rb b/lib/feed2imap/channel.rb
index 839d483..3fcc3e8 100644
--- a/lib/feed2imap/channel.rb
+++ b/lib/feed2imap/channel.rb
@@ -146,10 +146,16 @@ class Item
# Content
if (e = item.elements['content:encoded']) ||
(e = item.elements['description'] || item.elements['rss:description'])
- if e.cdatas[0]
- @content = e.cdatas[0].to_s.toUTF8(@channel.encoding).rmWhiteSpace!
- elsif e.text
- @content = e.text.toUTF8(@channel.encoding).text2html
+ if e.children.length > 1
+ s = ''
+ e.children.each { |c| s += c.to_s }
+ @content = s.toUTF8(@channel.encoding).rmWhiteSpace!
+ elsif e.children.length == 1
+ if e.cdatas[0]
+ @content = e.cdatas[0].to_s.toUTF8(@channel.encoding).rmWhiteSpace!
+ elsif e.text
+ @content = e.text.toUTF8(@channel.encoding).text2html
+ end
end
end
# Date