diff options
Diffstat (limited to 'modules/aggregator/aggregator.parser.inc')
-rw-r--r-- | modules/aggregator/aggregator.parser.inc | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/modules/aggregator/aggregator.parser.inc b/modules/aggregator/aggregator.parser.inc index 5eb84db42f9..4b1ff205327 100644 --- a/modules/aggregator/aggregator.parser.inc +++ b/modules/aggregator/aggregator.parser.inc @@ -177,7 +177,6 @@ function aggregator_element_start($parser, $name, $attributes) { switch ($name) { case 'image': case 'textinput': - case 'content': case 'summary': case 'tagline': case 'subtitle': @@ -186,16 +185,20 @@ function aggregator_element_start($parser, $name, $attributes) { $element = $name; break; case 'id': + case 'content': if ($element != 'item') { $element = $name; } case 'link': - if (!empty($attributes['rel']) && $attributes['rel'] == 'alternate') { + // According to RFC 4287, link elements in Atom feeds without a 'rel' + // attribute should be interpreted as though the relation type is + // "alternate". + if (!empty($attributes['HREF']) && (empty($attributes['REL']) || $attributes['REL'] == 'alternate')) { if ($element == 'item') { - $items[$item]['link'] = $attributes['href']; + $items[$item]['link'] = $attributes['HREF']; } else { - $channel['link'] = $attributes['href']; + $channel['link'] = $attributes['HREF']; } } break; @@ -223,12 +226,12 @@ function aggregator_element_end($parser, $name) { case 'textinput': case 'item': case 'entry': - case 'content': case 'info': $element = ''; break; case 'id': - if ($element == 'id') { + case 'content': + if ($element == $name) { $element = ''; } } |