Summary: RSS/RDF feeds aren't valid
Created: 2004-12-17 19:36
Status: Closed - not a bug
Category: Bug
From: GrahamL
Priority: 3
Version: 2.0.beta10

Description: The RSS and RDF feeds that PmWiki produces aren't valid. See, e.g. http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fwww.pmwiki.org%2Fwiki%2FMain%2FRecentChanges%3Faction%3Drss http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fwww.pmwiki.org%2Fwiki%2FMain%2FRecentChanges%3Faction%3Drdf

I've modified rss.php to produce valid feeds. I removed the xhtml doctypes (since they're not relevant). The most objectionable thing I might have done is to hard-code iso-8859-1 encoding. That could probably be fixed, but I'm not sure how.

This isn't entirely accurate. The doctypes are needed for RSS feeds so that HTML character entities (e.g., ç and é) are treated as legal. Yes, including the DOCTYPE causes the feeds to fail the feed validator, but not including the DOCTYPE causes the resulting RSS to fail in various newsreaders.

As an example, I used the code above for the "Test" group here on pmwiki.org -- note that it still won't validate: http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fwww.pmwiki.org%2Fwiki%2FTest%2FRecentChanges%3Faction%3Drss

Since it's more important that feeds actually work in newsreaders than it is for them to validate, I've left the DOCTYPE in for the time being.

In the larger context, there's not yet a well-defined way to include HTML character entities in RSS feeds -- when there is, we'll add it to the distribution.

See also PITS:00129 and PITS:00235 for more details about problems with other characters in RSS feeds.


Fair enough. Thanks. --GrahamL