HikksNotAtHome wrote:
In article <t5**************@wordsmith.demon.co.uk>, Geoff Wilkins
<Ge****@wordsmith.demon.co.uk> writes:
Using my IE v.6 browser, document.write doesn't convert HTML entities
(e.g. ', &) to the appropriate character (though NS 6.2 works
fine).
IE6 doesn't convert ' to an apostrophe even when its hard-coded.
'test' in a test page, in NS7 displays 'test' while in IE6, it
displays as written. So its not the document.write thats failing, its the
browser itself in its HTML side. Note: It does convert © to the copyright
symbol, whether hard coded or document.write generated.
Character entity references in HTML 4
http://www.w3.org/TR/html401/sgml/entities.html
"The named character reference ' (the apostrophe, U+0027) was
introduced in XML 1.0 but does not appear in HTML. Authors should
therefore use ' instead of ' to work as expected in HTML 4 user
agents."
C.16. The Named Character Reference '
http://www.w3.org/TR/2002/REC-xhtml1-20020801/#C_16
I tested
document.write("& '");
in MSIE 6 SP2 for windows in an HTML 4.01 strict DTD and it worked
without a problem.
I then tested
document.write("& '");
in MSIE 6 SP2 for windows in an XHTML 1.0 strict DTD and ' was not
converted into an '. \u0027 worked though.
DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunc...e7Section.html