W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 2001

Re: tidy and JavaScript

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Wed, 19 Sep 2001 17:19:42 +0200
To: Ignacio Vazquez-Abrams <ignacio@openservices.net>
Cc: "'html-tidy@w3.org'" <html-tidy@w3.org>
Message-ID: <uqdhqtoeglhcag71dgasc2mv27nr8ngdg0@4ax.com>
* Ignacio Vazquez-Abrams wrote:
>> >'<' should be encoded as '&lt;' in JavaScript.
>>
>> No! In HTML <script> is CDATA. CDATA elements are closed by the first
>> occurence of '<' + '/' + Letter, thus this sequence has to be split up
>> e.g. by escaping the '/', i.e. document.write("<\/p>") instead of
>> document.write("</p>").
>
>Huh. Encoding it always seemed to work for me. I guess that not all browsers
>follow the specs 100% ;)

Following the Specification, &lt; must not work.
-- 
Björn Höhrmann { mailto:bjoern@hoehrmann.de } http://www.bjoernsworld.de
am Badedeich 7 } Telefon: +49(0)4667/981028 { http://bjoern.hoehrmann.de
25899 Dagebüll { PGP Pub. KeyID: 0xA4357E78 } http://www.learn.to/quote/
Received on Wednesday, 19 September 2001 11:20:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:46 GMT