Proper RSS 2.0 and Beating Up XML
Excitedly, I bit off more than I can easily chew by volunteering to patch something in WordPress. It all stems from this bug.
I’m unhappy with the current behavior of RSS 2.0 feeds (I’m not sure about the other syndication formats) in summary mode. The problem is that while in summary mode, you can’t view any links offsite through the RSS feed. After much confusion, with the help of Dougal and Photomatt I learned that it was because the <content:encoded> tag in RSS 2.0 is dropped when a feed is in summary mode. <content:encoded> is the happy home of RSS data, the meat of your feed, that has all kinds of markup attached to it whereas <description> is meant only as a plaintext summary.
Anyways, my [not so] bright idea is to create a <content:encoded> section in the summary feed where the excerpt is truncated based upon the non-markup data. That means I have to ignore tags while at the same time being aware of whether or not I’m breaking the XML, and if I do, automatically fix it. The human brain can easily do this in a few seconds but defining rules for a computer to do it is taxing this human’s brain. Time for a break.