tags:

views:

23

answers:

2

Can't figure out why this is happening, but my RSS feeds are showing HTML encoding in the description field that I need to get rid of:

For example:

<description>&lt;div class=&quot;field field-type-text field-field-location&quot;&gt;   

I just can't figure out why this would be happening.

+1  A: 

That's correct. The content of <description> is supposed to be XML-text-encoded HTML. At least for RSS 2.0; other versions of RSS are notoriously inconsistent and woolly on this matter.

(If it weren't encoded, then only well-formed and namespaced XHTML could go in the element. This approach was not taken, primarily because RSS predates XHTML.)

bobince
Ah, ok. Thanks for the answer. The only problem is, and this is by which I found this "issue" is that google is ranking the keyword 'div' really highly when I look in Google Webmasters. So from an SEO perspective this is a problem.
JonB
Really? If Google's getting that from RSS 2.0 it's a bug! There is an argument for stripping all HTML markup from `<description>`, though, since there are old and horrid readers that don't treat it as encoded.
bobince
I think you are right, i'm going to investigate what is going on, rather than just trying to fix what I thought was a problem. Many thanks for your help.
JonB
+1  A: 

Hi,

I believe you are suffering from this issue:

http://drupal.org/node/666930

It's a core PHP bug that exists in certain versions of PHP, here's the core bug:

http://bugs.php.net/bug.php?id=45996

openist

related questions