]> git.mxchange.org Git - friendica.git/commitdiff
Also look for Atom feeds when probing link URLs
authorHypolite Petovan <hypolite@mrpetovan.com>
Tue, 1 Nov 2022 04:45:46 +0000 (00:45 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Tue, 1 Nov 2022 04:45:46 +0000 (00:45 -0400)
src/Network/Probe.php

index 45b838da215cfaf7cf97544588986893c90469d9..fc7113dbdaaf1b082a434dd5a0bbe1f32a3cf62e 100644 (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) : '';