Atom (Feed) Bomb
For those of you subscribed to one the new appnel.com feeds, you may have noticed that the full content of posts looked horrible.
Sorry about that. I had forgotten that there was a bug in the default Atom (and perhaps RSS -- I didn't check because I only use Atom for all my feeds) template until Chad Everett wrote me with the above screenshot to let me know about the problem. (Thanks Chad!)
In MT 4.0 the content tagset had this template markup in it:
<$MTEntryBody encode_xml="1" convert_breaks="0"$>
<$MTEntryMore encode_xml="1" convert_breaks="0"$>
The problem here is that the concvert_breaks="0" attribute turns of text formatting. If you used some like Markdown or PseudoPod as I do in other the content here, its not converted to HTML and the browser/aggregator will just display one big unintelligible piece of text as many of you subscribe to the feeds here probably saw.
I fixed this issue by removing the convert_breaks attribute entirely and rebuilding my feeds.
<$MTEntryBody encode_xml="1"$>
<$MTEntryMore encode_xml="1"$>
On a related note, one less then ideal thing about to separate tags generating HTML content with the encode_xml modifier applied is that there could be two CDATA blocks where one would have been sufficient. Gizmos for MT have a few tags that will help you handle that better if that bothers you.
If you want something really tight you could use the mt:entrybodymore tag which outputs both body and more content in one tag.
<$mt:entrybodymore encode_xml="1"$>
This tag automatically generates a div tag with an id of "more" for creating links with a jump to the start of that content. If you don't want that in your markup you could use the mt:xmlencodeblock.
<mt:xmlencodeblock>
<$mt:entrybody$>
<$mt:entrymore$>
</mt:xmlencodeblock>

1 Comment