aboutsummaryrefslogtreecommitdiff
path: root/p/api
diff options
context:
space:
mode:
authorGravatar hilariousperson <44742905+hilariousperson@users.noreply.github.com> 2025-08-06 12:32:16 +0200
committerGravatar GitHub <noreply@github.com> 2025-08-06 12:32:16 +0200
commit9faf2c1fa3c8c3ed82ff4c95733a018d0f9977a7 (patch)
treea10cf05bbd4d0bc7ea58b13c56ab4904f74f6464 /p/api
parentb7a39976f91612cdd5451599cfcb6e3a845f653f (diff)
GReader API: fix incorrect favicon URL (#7792)
* GReader API: fix incorrect favicon URL * Fix compatibility with custom favicons --------- Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'p/api')
-rw-r--r--p/api/greader.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/p/api/greader.php b/p/api/greader.php
index cefefbb23..311f17a7c 100644
--- a/p/api/greader.php
+++ b/p/api/greader.php
@@ -332,8 +332,6 @@ final class GReaderAPI {
self::internalServerError();
}
header('Content-Type: application/json; charset=UTF-8');
- $faviconsUrl = Minz_Url::display('/f.php?', '', true);
- $faviconsUrl = str_replace('/api/greader.php/reader/api/0/subscription', '', $faviconsUrl); //Security if base_url is not set properly
$subscriptions = [];
$categoryDAO = FreshRSS_Factory::createCategoryDao();
@@ -352,7 +350,9 @@ final class GReaderAPI {
//'firstitemmsec' => 0,
'url' => htmlspecialchars_decode($feed->url(), ENT_QUOTES),
'htmlUrl' => htmlspecialchars_decode($feed->website(), ENT_QUOTES),
- 'iconUrl' => $faviconsUrl . $feed->hashFavicon(),
+ 'iconUrl' => str_replace(
+ '/api/greader.php/reader/api/0/subscription', '', // Security if base_url is not set properly
+ $feed->favicon(absolute: true)),
];
}
}