summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-03-15 20:26:42 +0000
committerBrion Vibber <brion@pobox.com>2010-03-15 20:26:42 +0000
commitdfac4bfd095684daf935544ed3ae8b9e4eb9c08e (patch)
treed54b04ab4fa19ac0059b52d90c7a3b5f884293ed /plugins
parentc9232d8f26f055a9a1124b4b3db510e80979bf18 (diff)
Fix feed discovery: html:link@rel can contain multiple values; saw rel="updates alternate" in the wild at http://tantek.com/ which broke old discovery code.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/OStatus/lib/feeddiscovery.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/OStatus/lib/feeddiscovery.php b/plugins/OStatus/lib/feeddiscovery.php
index ff76b229e..7761ea583 100644
--- a/plugins/OStatus/lib/feeddiscovery.php
+++ b/plugins/OStatus/lib/feeddiscovery.php
@@ -211,11 +211,11 @@ class FeedDiscovery
$type = $node->attributes->getNamedItem('type');
$href = $node->attributes->getNamedItem('href');
if ($rel && $type && $href) {
- $rel = trim($rel->value);
+ $rel = array_filter(explode(" ", $rel->value));
$type = trim($type->value);
$href = trim($href->value);
- if (trim($rel) == 'alternate' && array_key_exists($type, $feeds) && empty($feeds[$type])) {
+ if (in_array('alternate', $rel) && array_key_exists($type, $feeds) && empty($feeds[$type])) {
// Save the first feed found of each type...
$feeds[$type] = $this->resolveURI($href, $base);
}