From 5e0c0137d3202a677c6aa8e54ca9117094a70224 Mon Sep 17 00:00:00 2001 From: Michael Teeuw Date: Thu, 12 May 2016 12:30:45 +0200 Subject: [PATCH] Fix news parsing when no description is given. #314 --- modules/default/newsfeed/fetcher.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/default/newsfeed/fetcher.js b/modules/default/newsfeed/fetcher.js index 76078e81..3840bea6 100644 --- a/modules/default/newsfeed/fetcher.js +++ b/modules/default/newsfeed/fetcher.js @@ -47,7 +47,7 @@ var Fetcher = function(url, reloadInterval, encoding) { var description = item.description || item.summary || item.content || ''; var pubdate = item.pubdate || item.published || item.updated; - if (title && description && pubdate) { + if (title && pubdate) { var regex = /(<([^>]+)>)/ig; description = description.replace(regex, ""); @@ -62,7 +62,10 @@ var Fetcher = function(url, reloadInterval, encoding) { console.log("Can't parse feed item:"); console.log(item); - + console.log('Title: ' + title); + console.log('Description: ' + description); + console.log('Pubdate: ' + pubdate); + } });