summaryrefslogtreecommitdiff
path: root/lib/feed2imap/channel.rb
diff options
context:
space:
mode:
authorlnu <lnu@f70e237a-67f3-0310-a06c-d2b8a7116972>2005-09-19 13:32:32 +0000
committerlnu <lnu@f70e237a-67f3-0310-a06c-d2b8a7116972>2005-09-19 13:32:32 +0000
commite39b903fb31d5afe030c8c6e53cf486babe5626f (patch)
tree07b741b361c33e9de3adedd79cef8980d4fe5cfd /lib/feed2imap/channel.rb
parent0844dd69d1fd4f337b96a10f436b211e92c2adf8 (diff)
downloadfeed2imap-e39b903fb31d5afe030c8c6e53cf486babe5626f.tar.gz
feed2imap-e39b903fb31d5afe030c8c6e53cf486babe5626f.tar.bz2
feed2imap-e39b903fb31d5afe030c8c6e53cf486babe5626f.zip
fix GNA bug #2845
git-svn-id: svn+ssh://svn.gna.org/svn/feed2imap/trunk/feed2imap@63 f70e237a-67f3-0310-a06c-d2b8a7116972
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