diff options
| author | 2025-01-26 23:19:44 +0100 | |
|---|---|---|
| committer | 2025-01-26 23:19:44 +0100 | |
| commit | d7ca2f8768fed347f6132a4cb98bd54c4d7163bb (patch) | |
| tree | d3080bdd3b5b957effe1441983997cded509583c /lib | |
| parent | d6c2daee51fa90f000c106492141baf3824931d2 (diff) | |
Doc force-https (#7259)
* Doc force-https
https://github.com/FreshRSS/FreshRSS/discussions/7252#discussioncomment-11951183
* Forgotten ^
* More proper support for comments
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/lib_rss.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php index f0a070820..99c72cb49 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -390,6 +390,11 @@ function customSimplePie(array $attributes = [], array $curl_options = []): \Sim if (is_array($force)) { $https_domains = array_merge($https_domains, $force); } + + // Remove whitespace and comments starting with # / ; + $https_domains = preg_replace('%\\s+|[\/#;].*$%', '', $https_domains) ?? $https_domains; + $https_domains = array_filter($https_domains, fn(string $v) => $v !== ''); + $simplePie->set_https_domains($https_domains); return $simplePie; } |
