mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-04-04 14:43:32 -04:00
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
This commit is contained in:
committed by
GitHub
parent
93f759fd4f
commit
ee2d2db780
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user