TXT import compatibility HTML comments (#8837)

Discard lines starting with `<` for e.g. HTML/XML comments, tags
Compatibility with TXT format of https://atlasflux.saynete.net
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/8818
This commit is contained in:
Alexandre Alapetite
2026-05-15 12:10:55 +02:00
committed by GitHub
parent 9a28f617ec
commit 66568f0283

View File

@@ -254,7 +254,7 @@ class FreshRSS_importExport_Controller extends FreshRSS_ActionController {
$outlines = '';
foreach (preg_split('/\R/', $contents) ?: [] as $line) {
$url = trim($line);
if ($url === '' || str_starts_with($url, '#')) {
if ($url === '' || str_starts_with($url, '#') || str_starts_with($url, '<')) {
continue;
}
if (filter_var($url, FILTER_VALIDATE_URL) === false) {