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

Also look for Atom feeds when probing link URLs
This commit is contained in:
Philipp 2022-11-01 06:45:12 +01:00 committed by GitHub
commit cdacc3f4fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) : '';