Do the Right Thing: Encode with CDATA Like Me.

| No Comments

I'm catching up on my weblog reading. Jon Udell posted a response to a message I sent him pointing out that he should use XML's CDATA rather then entity encoded HTML content. (Also known as HTML-escaped content) He goes on to quote the mod_content (an RSS 1.0 extension module) specification allowing for this technique to used. (Good point. Missed that.) Userland's 0.92 format document also states that entity-encoded HTML is permitted. He concludes "clearly entity-encoding fits best with current practice. But I agree that CDATA is more desirable for a variety of reasons."

It may be the current practice, but its one that needs to change. The reasons are many if you're a content publisher or developer:

  1. Unnecessary file "bloat"
  2. Non-standard XML encoding
  3. It can be prone to error
  4. CDATA requires less processing

Unwittingly, I was just as guilty of not encoding my RSS as I should. MoveableType's default RSS templates use entity encoded HTML. Tonight I modified those templates and CDATA encoded my RSS feeds. If your newsreader can't handle my feed, please let me know. I am told that some aggregators do not handle CDATA encoded descriptions. If you have trouble reading my feeds now, please let me know.

Leave a comment

About this Entry

This page contains a single entry by Timothy Appnel published on September 11, 2002 2:48 AM.

RSS Discussion Continues. Compatibility With What? was the previous entry in this blog.

Remembering From Across The River. is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 4.2rc2-en