W3C home > Mailing lists > Public > www-validator@w3.org > March 2012

Re: Validator confused with the character "<" and inline javascript

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Sat, 24 Mar 2012 08:36:58 +0200
Message-ID: <4F6D6B8A.3070007@cs.tut.fi>
To: Jvblaha@aol.com
CC: www-validator@w3.org
2012-03-20 22:42, Jvblaha@aol.com wrote:

> NOTE: Whenever possible, give the address of the document you were
> checking.

The idea is that when submitting a problem report, you should follow 
this advice, not quote it.

> Here are the validator messages.
> 1. /Line 1193, Column11: character "<" is the first character of a
> delimiter but occurred as data/
> while (i *<*requestCnt) {

Apparently you are using an XHTML doctype and this appears inside a 
<script> element. In XHTML, any occurrence of "<" inside the element 
must be escaped as &lt;, unless you use the CDATA technique suggested at
(Using CDATA is preferable, since you are most probably serving XHTML as 
HTML, and &lt; may therefore cause problems. The best option is to use 
an external JavaScript file.)

> By putting the javascript in a separate file, at least the error doesn't
> show up in Validator,

Indeed, because the separate file will not be read at all by the validator.

Administrativia: The message had been posted March 20th but I got it 
today, March 24th. According to message headers, it was received by a 
server at w3.org the day it was sent but sent forward to another w3.org 
server days later:

Received: from maggie.w3.org ([])
	by frink.w3.org with esmtp (Exim 4.69)
	(envelope-from <Jvblaha@aol.com>)
	id 1SA5tY-0005UY-U1
	for www-validator@listhub.w3.org; Tue, 20 Mar 2012 20:43:04 +0000
Received: from imr-db01.mx.aol.com ([])
	by maggie.w3.org with esmtp (Exim 4.72)
	(envelope-from <Jvblaha@aol.com>)
	id 1SA5tT-0000ba-Jh

I think there have been a few such incidents recently.

Received on Saturday, 24 March 2012 06:37:27 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:18:05 UTC