Internet explorer does not recognise “apos” entity in XHTML

In short: wanted an apostrophe in a website, so coded it with the ' entity.

Looks correct in Firefox, Konqueror, Safari … but Internet Explorer shows the text “'” not the apostrophe.

Actually, the ' entity is not defined in HTML, but it is one of the standard XML character entities, and the website is clearly identified with the header:

< ?xml version="1.0" encoding="utf-8"?>< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

.. and it validates correctly with http://validator.w3.org/ - so this is clearly an Internet Explorer bug.

Sigh. Upshot - use &#39; for apostrophe instead. Valid XHTML but also valid in HTML, so IE displays it as expected.

IE users can see the difference here: ' vs ' - other browsers will see two apostrophes.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

You must be logged in to post a comment.