Evanss
Evanss

Reputation: 23593

  makes RSS feed fail validation

Im making an RSS feed from content that's been imported into my site. The content contains  , which makes the RSS feed fail validation. I'm trying to strip out the   but I'm not sure ill be able to. The feed looks fine in google reader but IE's reader just displays an error.

Are their any other solutions to my problem? Could I make the doc type less strict or something similar?

Thanks

Upvotes: 0

Views: 1223

Answers (2)

Naz
Naz

Reputation: 408

You shouldn't need   at all if the content will be visible in an rss feed. If you're using PHP to generate the feed, you can use str_replace to strip it.

$stripped = str_replace(" ", " ", $original);

So if you're iterating thru a loop, $original will be the var with the original data, when outputting the data, use $stripped instead. It will replace the $nbsp; with a single space.

Upvotes: 1

user647772
user647772

Reputation:

You could replace all   entities with  .

Upvotes: 0

Related Questions