Entities in ALT (was: [no useful subject (Amaya)])

> > The instance that the &amp occurs is within the alt=" " attribute.  The
> > value of the attribute, which is text, is not parsed by the browser and as
> > such, & would be rendered as '&' not as an '&'.


From the HTML 4.0 Spec:

<!ENTITY % Text "CDATA">
...
alt %Text; #REQUIRED -- short description -- 

Entities are interpreted in CDATA, so must be interpreted in ALT.

This is the sort of area where the lazy parsers in most GUI browsers 
are likely to fail to follow the SGML rules properly.  Entities in 
href is another problem area with such implementations.

Amaya, Lynx, Netscape (4.05) and IE4 (4.01) display this correctly, 
but Amaya seems to fail to encode when it saves (v1.3 Win32).



-- 
David Woolley - Office: David Woolley <djw@bts.co.uk>
BTS             Home: <david@djwhome.demon.co.uk>
Wallington      TQ 2887 6421
England         51  21' 44" N,  00  09' 01" W (WGS 84)

Received on Thursday, 3 December 1998 07:16:40 UTC