Also look for Atom feeds when probing link URLs

This commit is contained in:
Hypolite Petovan 2022-11-01 00:45:46 -04:00
parent df69dc0edb
commit 5ef76e8f14

View File

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