Merge pull request #12088 from MrPetovan/bug/probe-atom

Also look for Atom feeds when probing link URLs
develop
Philipp 2022-11-01 06:45:12 +01:00 zatwierdzone przez GitHub
commit cdacc3f4fb
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -1721,6 +1721,7 @@ class Probe
$xpath = new DOMXPath($doc);
$feedUrl = $xpath->evaluate('string(/html/head/link[@type="application/rss+xml" and @rel="alternate"]/@href)');
$feedUrl = $feedUrl ?: $xpath->evaluate('string(/html/head/link[@type="application/atom+xml" and @rel="alternate"]/@href)');
$feedUrl = $feedUrl ? self::ensureAbsoluteLinkFromHTMLDoc($feedUrl, $url, $xpath) : '';