hello

when creating a view of type node -> feed -> rss, and setting row style to Fields and not content, the RSS feed picks up by default the Content: Link for Link in the RSS settings.

the problem is, Content: Link is outputed as formatted HTML
<a href="abc">my title</a>

alas, if we try to enable strip HTML tags from this field, it basically... does nothing. the HTML is still included.

this results in an output produced by views (for this kind of RSS), which is always broken

can Strip HTML be fixed for Content: Link?

Comments

Anonymous’s picture

That's true, I had the same issue. A solution for me was to display the whole content instead of fields. The RSS plugin then seems to handle that properly.

Another solution could be to construct the URL manually by rewriting the output to something like "node/[content:nid]" (perhaps worth a try, but I didn't try myself).

Yura Filimonov’s picture

Confirming this, have the same problem on fresh install, was just trying to configure RSS feed output with "Fields" row styling, having read that the other option uses too much resources.

I was only having tags in the title and the link.

To remove tags from the title, here's what I did:

In the View display settings (such as "Feed"), in the Title field settings unchecked "Link this field to the original piece of content". Also, in the same window, in the "Style settings" unchecked "Add default classes".

Still digging in the link.

kpaxman’s picture

Looks like "link" should be set to use Content: Path, rewritten to use an absolute link.

joelcollinsdc’s picture

This is a really annoying bug. Please fix this. It should not be this difficult to make a rss field with links.

joelcollinsdc’s picture

FWIW, this is how i fixed this ( i coudln't use a theme function, so it was even more obtuse...)

+function mymodule_theme_registry_alter(&$theme_registry) {
+ $theme_registry['views_view_row_rss']['preprocess functions'][] = 'mymodule_preprocess_views_row_rss';
+}
+
+function mymodule_preprocess_views_row_rss(&$vars) {
+ //see http://drupal.org/node/1780196
+ $vars['link'] = str_replace('%3Ca%20href%3D%22/', '', $vars['link']);
+ $vars['link'] = str_replace('%22%3Eview%3C/a%3E', '', $vars['link']);
+}

tropicfruit’s picture

Seems this is caused when views tries to link the field back to its content. At least in my feed display the checkbox was filled accordingly by default.

Too fix this, just go to "your view" > "your feed display" > Fields > Title > Uncheck "Link this field to the original piece of content".

czigor’s picture

Status: Active » Closed (works as designed)

The RSS field options form says for the Link field: "This must be a drupal relative path."
So as stated in #3, you should use Content:Path, not Content:Link and it works as it should.

joshuautley’s picture

#3 worked for me. Rewrite as absolute in views for the feed Title.

UksusoFF’s picture

Issue summary: View changes

I'm have this problem on 7.x-3.8
I've try add Content:Path instead of Content:Link but it's give only front page link, not node.

peterg.griffin’s picture

Content: Path worked fine for me. No need to use the absolute path as views feed link settings seems to add the domain by itself.

neuquen’s picture

#3 worked for me as well.