Ignore malformed feed probe candidates (#43)

Co-authored-by: Codex Microtask Operator <codex-microtask@example.com>
This commit is contained in:
Autowebassat-blip 2026-06-14 07:55:39 +02:00 committed by GitHub
parent fbf4d76372
commit ffefd364ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 1 deletions

View file

@ -30,7 +30,7 @@ function candidateUrls(query: FeedDiscoveryQuery, configured: string[]) {
for (const entry of configured) {
const [url, ...keywords] = entry.split("|").map((part) => part.trim());
if (!url) {
if (!/^https?:\/\//i.test(url)) {
continue;
}
if (keywords.length === 0 || keywords.some((keyword) => query.q.toLowerCase().includes(keyword.toLowerCase()))) {