XHTML script validation error

Hello,

My suggestion is simple. Whenever a script is in the head on an XHTML 1.0 document, it should validate '<' (less than) characters:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Title</title>
<script type='javascript'>
var myvar = 0;
for (var i = 0; i < 10; i ++){
    myvar += i;
};
alert(myvar);
</script>
</head>

<body>
</body>
</html>

That's supposed to be valid, but the validator tells that the '<' occurred as data.

Thanks for reading,

Andras

Received on Wednesday, 4 June 2008 07:38:51 UTC