Package: libmrss0
Version: 0.19.2-1
Followup-For: Bug #503225
The attached patch corrects behavior for atom feeds that have a link
element without a "rel" attribute. These should be treated as if
rel="alternate" was present.
-- System Information:
Debian Release: 5.0
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages libmrss0 depends on:
ii libc6 2.7-16 GNU C Library: Shared libraries
ii libcurl3-gnutls 7.18.2-7 Multi-protocol file transfer libra
ii libnxml0 [libnxml-abi-0.18.3] 0.18.3-2 C library for parsing, writing and
libmrss0 recommends no packages.
libmrss0 suggests no packages.
-- no debconf information
--
Byron Clark
diff -Naur libmrss-0.19.2/src/mrss_parser.c libmrss-0.19.2.atom/src/mrss_parser.c
--- libmrss-0.19.2/src/mrss_parser.c 2008-08-21 15:59:22.000000000 -0600
+++ libmrss-0.19.2.atom/src/mrss_parser.c 2008-12-07 11:30:43.000000000 -0700
@@ -367,7 +367,16 @@
/* link href -> link */
else if (!item->link && !strcmp (cur->value, "link")
&& (c = nxmle_find_attribute (cur, "href", NULL)))
- item->link = c;
+ {
+ char *t;
+
+ /* alternate link is either rel="alternate" or a link tag
+ * without a rel attribute
+ */
+ t = nxmle_find_attribute (cur, "rel", NULL);
+ if ((t && !strcmp(t, "alternate")) || !t)
+ item->link = c;
+ }
/* content -> description */
else if (!item->description && !strcmp (cur->value, "content"))