Package: libfeedparser-ruby1.8
Version: 0.1-4
Severity: normal
Tags: patch
Hi
on some ATOM feeds (eg. ones from Google Reader) feedbarser (used via
feed2imap) fails to parse content as <link> element does not have type
attribute. Fix for this is easy and same is used in main Feed class.
--
Michal Čihař | http://cihar.com | http://blog.cihar.com
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/dash
Kernel: Linux 2.6.16-1-amd64-k8
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Versions of packages libfeedparser-ruby1.8 depends on:
ii ruby1.8 1.8.4-2 Interpreter of object-oriented scr
libfeedparser-ruby1.8 recommends no packages.
-- no debconf information
--- /tmp/feedparser.rb 2006-05-29 16:29:59.000000000 +0200
+++ /usr/lib/ruby/1.8/feedparser/feedparser.rb 2006-05-29 16:30:23.000000000
+0200
@@ -197,9 +197,10 @@
end
# Link
item.each_element('link') do |e|
- if e.attribute('type').value == 'text/html' or
+ if e.attribute('type') and (
+ e.attribute('type').value == 'text/html' or
e.attribute('type').value == 'application/xhtml' or
- e.attribute('type').value == 'application/xhtml+xml'
+ e.attribute('type').value == 'application/xhtml+xml' )
if (h = e.attribute('href')) && h.value
@link = h.value
end