I've been seeing a number of feeds recently using Atom 0.3 with a content
type of "text/html" and no mode attribute (i.e. the equivalent of
mode="xml"). However, the markup in that content is wrapped in a CDATA
section, for example something like this:
<content type="text/html">
<![CDATA[<div xmlns="http://www.w3.org/1999/xhtml"><p>Content goes
here.</p></div>]]>
</content>
If it had been marked as "escaped" you would obviously unescape the CDATA
before interpreting the markup. However, since the mode is technically
"xml", I was under the impression that it should be treated as inline XML
and no unescaping was necessary. But that would result in the literal text
"<div xmlns="http://www.w3.org/1999/xhtml"><p>Content goes here</p></div>"
being displayed to the user which is obviously not what is intended.
So is this a bug in the content generator (all the feeds I've seen appear to
be using TypePad) or are you supposed to ignore the mode attribute when the
content type is set to "text/html" and always treat it as escaped? I know
Atom 0.3 is deprecated and I shouldn't be having to deal with this, but the
reality of the situation is that there are a whole lot of Atom 0.3 feeds
still out there (probably more than Atom 1.0) and I need to be able to
support them.
Some feeds where you can see the problem (not all entries though):
http://feeds.feedburner.com/Flickrblog
http://dilbertblog.typepad.com/the_dilbert_blog/atom.xml
http://blog.cymfony.com/atom.xml
Regards
James