This is a very common XHTML mistake, now growing in visibility much due to the Google Chrome boom.
Google Chrome is based on Webkit, an open source browser engine also used in Apple’s Safari; Webkit is very restrict on XHTML rules;

This particular error is caused due to common HTML entities usage on XHTML outputs, which follows XML entities rules.
Basically means you are using a  -like entity, when in XHTML you should use a  -like entity;
The only named entities for XML are &, > and <. For all others you need to use the Unicode character code (eg.  ).

Here’s a HTML to XML entities conversion table:

Character HTML entity XML entity
" " "
& & &
< &lt; &#60;
> &gt; &#62;
  &nbsp; &#160;
¡ &iexcl; &#161;
¢ &cent; &#162;
£ &pound; &#163;
¤ &curren; &#164;
¥ &yen; &#165;
¦ &brvbar; &#166;
§ &sect; &#167;
¨ &uml; &#168;
© &copy; &#169;
ª &ordf; &#170;
« &laquo; &#171;
¬ &not; &#172;
­ &shy; &#173;
® &reg; &#174;
¯ &macr; &#175;
° &deg; &#176;
± &plusmn; &#177;
² &sup2; &#178;
³ &sup3; &#179;
´ &acute; &#180;
µ &micro; &#181;
&para; &#182;
· &middot; &#183;
¸ &cedil; &#184;
¹ &sup1; &#185;
º &ordm; &#186;
» &raquo; &#187;
¼ &frac14; &#188;
½ &frac12; &#189;
¾ &frac34; &#190;
¿ &iquest; &#191;
À &Agrave; &#192;
Á &Aacute; &#193;
 &Acirc; &#194;
à &Atilde; &#195;
Ä &Auml; &#196;
Å &Aring; &#197;
Æ &AElig; &#198;
Ç &Ccedil; &#199;
È &Egrave; &#200;
É &Eacute; &#201;
Ê &Ecirc; &#202;
Ë &Euml; &#203;
Ì &Igrave; &#204;
Í &Iacute; &#205;
Î &Icirc; &#206;
Ï &Iuml; &#207;
Ð &ETH; &#208;
Ñ &Ntilde; &#209;
Ò &Ograve; &#210;
Ó &Oacute; &#211;
Ô &Ocirc; &#212;
Õ &Otilde; &#213;
Ö &Ouml; &#214;
× &times; &#215;
Ø &Oslash; &#216;
Ù &Ugrave; &#217;
Ú &Uacute; &#218;
Û &Ucirc; &#219;
Ü &Uuml; &#220;
Ý &Yacute; &#221;
Þ &THORN; &#222;
ß &szlig; &#223;
à &agrave; &#224;
á &aacute; &#225;
â &acirc; &#226;
ã &atilde; &#227;
ä &auml; &#228;
å &aring; &#229;
æ &aelig; &#230;
ç &ccedil; &#231;
è &egrave; &#232;
é &eacute; &#233;
ê &ecirc; &#234;
ë &euml; &#235;
ì &igrave; &#236;
í &iacute; &#237;
î &icirc; &#238;
ï &iuml; &#239;
ð &eth; &#240;
ñ &ntilde; &#241;
ò &ograve; &#242;
ó &oacute; &#243;
ô &ocirc; &#244;
õ &otilde; &#245;
ö &ouml; &#246;
÷ &divide; &#247;
ø &oslash; &#248;
ù &ugrave; &#249;
ú &uacute; &#250;
û &ucirc; &#251;
ü &uuml; &#252;
ý &yacute; &#253;
þ &thorn; &#254;
ÿ &yuml; &#255;
&euro; &#8364;
[del.icio.us] [Digg] [Facebook] [Twitter]

7 Responses

  1. benbois Says:

    thanks for the tips.. really useful.

  2. HiNuN Says:

    “The only named entities for XML are &, > and <.”

    That’s wrong. There are five XML predefined entities:

    <, ", &, ' and >

  3. HiNuN Says:

    “The only named entities for XML are &&, &> and &<.”

    That’s wrong. There are five XML predefined entities:

    &<, &", &&, &' and &>

  4. Jim D Says:

    Maybe you’re reading a different spec than I am, but the   entity is clearly defined for XHTML – look at the spec.

    And if the doctype is in fact XHTML strict, they work fine in webkit.

    And if the doctype is HTML transitional, which you claim should work, then it fails in Webkit.

    Sorry, this is a webkit bug, pure and simple.

  5. Frans Says:

    Jim D, in XHTML 5 there are no entities but the default XML ones. Of course, if Webkit has the same behavior in XHTML 1.0 and 1.1 then it’s a bug, but in XHTML 5 it’s not.

  6. Elemental Says:

    Hello, i’m having trouble with webkit browsers (safari and chrome) displaying my web App.
    It shows this message “Entity ‘agrave’ not defined”.
    Do u have any idea how can i fix this? since it’s xhtml related

  7. Aleks Revo Says:

    > Do u have any idea how can i fix this?

    Try to read the article

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.