Skip to content

A free, self-hostable news aggregator…

Use .html extension for full content pages instead of .spc (#6724)

Alexandre Alapetitef544da6015ac
diff --git a/app/Models/Feed.php b/app/Models/Feed.php
index 5f9212b41..50495a361 100644
--- a/app/Models/Feed.php
+++ b/app/Models/Feed.php
@@ -899,7 +899,11 @@ class FreshRSS_Feed extends Minz_Model {
*/
public function cacheFilename(string $url = ''): string {
$simplePie = customSimplePie($this->attributes(), $this->curlOptions());
- $url = $url ?: htmlspecialchars_decode($this->url);
+ if ($url !== '') {
+ $filename = $simplePie->get_cache_filename($url);
+ return CACHE_PATH . '/' . $filename . '.html';
+ }
+ $url = htmlspecialchars_decode($this->url);
$filename = $simplePie->get_cache_filename($url);
if ($this->kind === FreshRSS_Feed::KIND_HTML_XPATH) {
return CACHE_PATH . '/' . $filename . '.html';