From 3826ba5ad49a8669e2123b1cfa78a5c467f82507 Mon Sep 17 00:00:00 2001 From: "gavin%gavinsharp.com" Date: Fri, 25 Apr 2008 16:51:14 +0000 Subject: [PATCH] Bug 429049: yahoo rss newsfeed (de.news.yahoo.com) is not previewed properly, patch by Will Guaraldi , r+a=mconnor --- toolkit/components/feeds/src/FeedProcessor.js | 4 ++- .../test/xml/rss2/mrss_content_429049.xml | 32 +++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 toolkit/components/feeds/test/xml/rss2/mrss_content_429049.xml diff --git a/toolkit/components/feeds/src/FeedProcessor.js b/toolkit/components/feeds/src/FeedProcessor.js index 74cf3450979..64298ee083f 100644 --- a/toolkit/components/feeds/src/FeedProcessor.js +++ b/toolkit/components/feeds/src/FeedProcessor.js @@ -521,7 +521,9 @@ Entry.prototype = { __enclosure_map: null, _addToEnclosures: function Entry_addToEnclosures(new_enc) { - if (!bagHasKey(new_enc, "url")) + // items we add to the enclosures array get displayed in the FeedWriter and + // they must have non-empty urls. + if (!bagHasKey(new_enc, "url") || new_enc.getPropertyAsAString("url") == "") return; if (this.__enclosure_map == null) diff --git a/toolkit/components/feeds/test/xml/rss2/mrss_content_429049.xml b/toolkit/components/feeds/test/xml/rss2/mrss_content_429049.xml new file mode 100644 index 00000000000..d13efc94c55 --- /dev/null +++ b/toolkit/components/feeds/test/xml/rss2/mrss_content_429049.xml @@ -0,0 +1,32 @@ + + + + + + + +jbb@dallas.example.com (Joe Bob Briggs) +http://example.org +test + +bar +no description + + + + +jbb@dallas.example.com (Joe Bob Briggs) +http://example.org +test empty + +bar +no description + + + +