One of my content types has a Date CCK field.
I'd like that to be the <title> of each <item>.
So I put the CCK field in as the <title> element and this comes out in the feed:

...
<title>&lt;span class=&quot;date-display-single&quot;&gt;Tue, Jun 30&lt;/span&gt;</title>
...

How can I suppress that css formatting?

I have another cck field that is working fine for the <description> elements; no formatting there. Probably because I am forcing it to be Plain Text in the Views field configuration.

Comments

charlie-s’s picture

I'm getting this too, with a date CCK field.

I was able to get all my other fields to stop rendering HTML except for this damn date field.. please post back if you've gotten yours working.

charlie-s’s picture

Well, I had to hack the module, which I hate doing but I need a fix. The file in question is views_plugin_style_rss_fields.inc, foreach() loop @ line 111. It's pre-rendering all views fields (which is normally cool) but I'm going to force it to strip HTML tags since I'll never need them in RSS feeds and I can't get CCK date to cooperate. I achieve this by turning:

$renders[$count][$id] = $this->view->field[$id]->theme($row);

into

$item = $this->view->field[$id]->theme($row);
$item = html_entity_decode($item);
$item = strip_tags($item);
$renders[$count][$id] = $item;
ice5nake’s picture

Version: 6.x-1.0-beta4 » 6.x-1.0-beta5

Has this been moved into the beta5. Because beta5 seems to be doing this and I don't understand why this would be the default behavior. Classes and ids are valid with description and title tags are they not?

charlie-s’s picture

Why would you want any formatting in an RSS feed? Isn't the point to output data only, and to let the end user style the feeds?

maciej.zgadzaj’s picture

Status: Active » Closed (fixed)

Please try the newest 6.x-1.x-dev version (from 2011-Nov-09) and make sure that you check "Strip HTML tags" checkbox in your Date field options.

Essentially, HTML is allowed only in <description> element of RSS feed, should not be added to any other field (see RSS 2.0 specification).

Also, please read the first draft of module documentation for what it can and can't do (and how).