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

Validator confused with the character "<" and inline javascript

From: <Jvblaha@aol.com>
Date: Tue, 20 Mar 2012 16:42:32 -0400 (EDT)
Message-ID: <23ff5.2cdd859f.3c9a45b8@aol.com>
To: www-validator@w3.org
CC: jvblaha@aol.com
NOTE: Whenever possible, give the address of the  document you were 
checking.  


 
 
Here are the validator messages. 
1. Line 1193, Column11:  character "<" is the first character of a 
delimiter but occurred as  data  
while (i < requestCnt) {                                             
_✉_ (http://validator.w3.org/feedback.html?uri=;errmsg_id=404#errormsg)   
This message may appear in several cases:  
·         You tried to include the "<" character in your page: you  should 
escape it as "&lt;" 
·         You used an unescaped ampersand "&": this may be valid  in some 
contexts, but it is recommended to use "&amp;", which is always  safe. 
·         Another possibility is that you forgot to close quotes in a  
previous tag. 

About my code:

 
All the other code between <script  type="text/javascript"> and </script> 
is acceptable to  Validator. 
 
By putting the javascript in a separate  file, at least the error doesn't s
how up in Validator, and similar script has  run fine for a year.  Here's a 
sample of some of the  code:

____________________________
 
 i = 0;
while (i <  requestCnt) {      
if (requests [i] ==  dropRequest) { 
x = i +  1;   
while (i < requestCnt)  {
requests [i] = requests [x];  
i++;
x++;    
}
}
else  {
i++;
}
}  
requestCnt--; 
_______________________
 
I don't need a reply and do like  Validator.
 
Jim  Blaha
Received on Saturday, 24 March 2012 00:18:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:50 GMT