Re: tidy and JavaScript

On Wed, 19 Sep 2001, Bjoern Hoehrmann wrote:

> * Ignacio Vazquez-Abrams wrote:
> >On Tue, 18 Sep 2001, Schrader Wolfgang OI43 wrote:
> >
> >> I tried tidy together with ultraedit (www.ultraedit.com)
> >> and attach the source and the error list.
>
> I wonder where you got the localized version of HTML Tidy from. I always
> wanted to provide localized error messages, but I never had time to do
> it and the current implementation of general localization makes it not
> very easy to implement different languages into HTML Tidy (_and_
> maintaining the source).

It should be easy enough with gettext. If you want I can produce a diff
against current CVS with all the necessary strings annotated.

> >> Zeile 246 Spalte 0 - Warnung: '<' + '/' + Buchstabe ist hier nicht
> >> zugelassen
> >
> >'<' 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% ;)

-- 
Ignacio Vazquez-Abrams  <ignacio@openservices.net>

Received on Wednesday, 19 September 2001 10:40:42 UTC