There are some stupid RSS readers, typically to be embedded into simple static HTML pages, rendering the feed's contents inside iframe. If the incoming feed is from a Drupal site, the "Read more" link opens inside the same iframe (i.e. tiny box inside some other site), which is ugly and almost unusable. This was recently reported as a bug to the site I maintain.

Although this is not strictly Drupal's fault, I think it would be nice if we included the 'target' attribute, providing a truly interoperable feed (as today's web-based reader-applications stand). Since the link is rendered by it's own l() call, it's pretty easy to add the target="_top" attribute, which doesn't change the existing behavior in any other way, except breaking out of iframes.

Patch attached.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RobLoach’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
752 bytes

There was an offset, so I updated it to HEAD.... Although the patch works, I'm not sure how it effects the majority of RSS readers.

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Needs review

Hm, why not target="_blank"?

JirkaRybka’s picture

FileSize
754 bytes

I would be absolutely fine with "_blank" - in fact THAT was what my site needed, and was originally in my patch. But I realized later, that it in fact changes the behavior (post-beta too), throwing new windows, so I thought "_top" is less intrusive and so more acceptable. It's a matter of taste thing, feel free to choose. :)

As for #1 "how it affects" - In general, it's a bit unlucky to render links and put into the content area (all other URL's in the feed are defined separately, and so rendered by the reader then), but removing the pre-rendered "read more" link smells like post-freeze feature to me (although it would be not much of a change, there's a link to the post in the feed anyway). The idea of removal is also supported by the bug report I originally received on my site, but I consider it most intrusive of the three.

Attaching an alternative patch with "_blank" (just a quick edit to #1 attachment, which applies cleanly too).

RobLoach’s picture

Status: Needs review » Reviewed & tested by the community

Excellent.

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

OK, committed.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.