Really things get messy though when you throw HTML into the mix. Because in HTML 4, apos is no longer defined as an entity. In XHTML (since it's based on XML), on the other hand, it's of course mandatory. And in RSS (which is also XML) technically as well. What a bloody mess, that w3c, not even bothering to look at what other, similar languages do in HTML and aligning with them.

What happens? The Python Desktop Server originally also encoded the simple ' as an entity (namely apos). Most browsers do this too, only iCab and Omniweb don't. Actually those two are doing it right, because apos isn't defined in HTML 4 anyway.

But in the Python Desktop Server I only have a quoteXML routine, which I've been using for both so far. Actually I should now introduce a quoteHTML, and depending on the application, use the appropriate one. What a pain.

At Der Schockwellenreiter there's the original article.