Many feeds use the xml:base on the root rss element to specify the base url that should be used for links containes within the feed. Drupal feeds set this to <rss version="0.92" xml:base="http://drupal.org">, and links contained within the feed are relative to that base url.

Imported feeds have no awareness of the base url, and so links and up being relative to the site that the feeds have been imported into, rather than the site they came from.

CommentFileSizeAuthor
#6 common_syndication_parser.zip8.94 KBtivv

Comments

mrfelton’s picture

related:
http://drupal.org/node/88183#comment-455578

and to see how aggregator is planning on dealing with it, see
http://drupal.org/node/395764#comment-1393182

mrfelton’s picture

For now, I fixed my view by using a custom Views template for the field in question:

$pattern = '#<div class="title">(.*) at [0-9]{2}:[0-9]{2}</div>#';
preg_match($pattern, $row->feeds_data_drupal_cvs_commit_feed_description, $matches);
$description = $matches[1];
$description = str_replace("<a href=\"/", "<a href=\"http://www.drupal.org/", $description);
print $description;

This ensures that links from the feed link back to drupal.org (where the feed came from), rather than to my own site

alex_b’s picture

Which parser are you using?

mrfelton’s picture

I'm using the Common syndication parser

seanberto’s picture

Subscribing. I'm encountering this with the Beta4 release using the common syndication parser and mapping field with the Data module.

tivv’s picture

StatusFileSize
new8.94 KB

Dunno if it is this ticket or another one, but I have had a problem with facebook page feed. Facebook do not provide base attribute, but uses relative links. I did next changes to atom parsing:
1) If base is not specified, use feed link as base
2) (not actually required for facebook, but I did not like current primitive base handling) - use correct routine to resolve relative URI vs base.
The routing was copypasted from the web, so I don't think this may directly go to the module, but anyone interested may grab the result and test.
File changed (and attached) is in profiles/managingnews/modules/contrib/feeds/libraries in Managing News distribution.

john franklin’s picture

Nearly four years later, this is still an issue. (And still an issue in Aggregator, too!)

twistor’s picture

Issue summary: View changes
Status: Active » Closed (outdated)