From 5ada718357fc4edf7f60f2a35bd040ad811ba310 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 5 May 2013 21:44:03 -0400 Subject: [PATCH] Blank titles are filled with the url --- miniflux/vendor/PicoFeed/Parsers/Atom.php | 2 ++ miniflux/vendor/PicoFeed/Parsers/Rss10.php | 3 ++- miniflux/vendor/PicoFeed/Parsers/Rss20.php | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/miniflux/vendor/PicoFeed/Parsers/Atom.php b/miniflux/vendor/PicoFeed/Parsers/Atom.php index 7478bd1..6e925d0 100644 --- a/miniflux/vendor/PicoFeed/Parsers/Atom.php +++ b/miniflux/vendor/PicoFeed/Parsers/Atom.php @@ -39,6 +39,8 @@ class Atom extends Parser $item->author = $author; $item->content = $this->filterHtml($this->getContent($entry), $item->url); + if (empty($item->title)) $item->title = $item->url; + $this->items[] = $item; } diff --git a/miniflux/vendor/PicoFeed/Parsers/Rss10.php b/miniflux/vendor/PicoFeed/Parsers/Rss10.php index 000119c..d04bdd5 100644 --- a/miniflux/vendor/PicoFeed/Parsers/Rss10.php +++ b/miniflux/vendor/PicoFeed/Parsers/Rss10.php @@ -9,7 +9,6 @@ class Rss10 extends Parser $this->content = $this->normalizeData($this->content); \libxml_use_internal_errors(true); - $xml = \simplexml_load_string($this->content); if ($xml === false) { @@ -74,6 +73,8 @@ class Rss10 extends Parser } } + if (empty($item->title)) $item->title = $item->url; + $item->id = $item->url; $item->content = $this->filterHtml($item->content, $item->url); $this->items[] = $item; diff --git a/miniflux/vendor/PicoFeed/Parsers/Rss20.php b/miniflux/vendor/PicoFeed/Parsers/Rss20.php index bc04d84..919b968 100644 --- a/miniflux/vendor/PicoFeed/Parsers/Rss20.php +++ b/miniflux/vendor/PicoFeed/Parsers/Rss20.php @@ -91,6 +91,8 @@ class Rss20 extends Parser $item->id = $item->url; } + if (empty($item->title)) $item->title = $item->url; + $item->content = $this->filterHtml($item->content, $item->url); $this->items[] = $item; }