From ee2d2db7807065587664d75de2c617f06c8ee568 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 22 Aug 2021 13:33:58 +0200 Subject: Fallback for feeds with empty title (#3787) * Fallback for feeds with empty title Address a part of https://github.com/FreshRSS/FreshRSS/issues/3776 for existing feeds * Also strip www prefix * Reuse fallback logic --- app/Controllers/feedController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/Controllers/feedController.php') diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index 8ee3d5324..d43f05d4a 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -470,10 +470,11 @@ class FreshRSS_feed_Controller extends Minz_ActionController { } if ($simplePie != null) { - if (trim($feed->name()) == '') { + if ($feed->name(true) == '') { //HTML to HTML-PRE //ENT_COMPAT except '&' $name = strtr(html_only_entity_decode($simplePie->get_title()), array('<' => '<', '>' => '>', '"' => '"')); - $feedProperties['name'] = $name == '' ? $feed->url() : $name; + $feed->_name($name); + $feedProperties['name'] = $feed->name(false); } if (trim($feed->website()) == '') { $website = html_only_entity_decode($simplePie->get_link()); -- cgit v1.2.3