Просмотр исходного кода

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
Alexandre Alapetite 5 дней назад
Родитель
Сommit
66568f0283
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      app/Controllers/importExportController.php

+ 1 - 1
app/Controllers/importExportController.php

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