summaryrefslogtreecommitdiff
path: root/app/Controllers/feedController.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2021-08-22 13:33:58 +0200
committerGravatar GitHub <noreply@github.com> 2021-08-22 13:33:58 +0200
commitee2d2db7807065587664d75de2c617f06c8ee568 (patch)
tree1ea3ca94b0497504a33cb19c7831630d9a238417 /app/Controllers/feedController.php
parent93f759fd4f88cc624b46700f73fb8839e450f820 (diff)
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
Diffstat (limited to 'app/Controllers/feedController.php')
-rwxr-xr-xapp/Controllers/feedController.php5
1 files changed, 3 insertions, 2 deletions
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('<' => '&lt;', '>' => '&gt;', '"' => '&quot;'));
- $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());