Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/08/2008, 04:49
guybrush78
 
Fecha de Ingreso: febrero-2005
Ubicación: Cádiz
Mensajes: 50
Antigüedad: 19 años, 2 meses
Puntos: 2
Validacion de html 4.0.1 en w3c

Buenas a tod@s

Estoy haciendo la validación de mi web para que cumplan los estándares de html 4.0.1 y va perfecto excepto en una cosa.... que no está mal.

Dentro de un script de javascript, tengo el operador <, y parece que el validador no ve que es simplemente un operador y cree que es una etiqueta... ¿es un error del validador?

este es el mensaje:

Validation Output: 1 Error

1. Warning Line 149, Column 24: character "<" is the first character of a delimiter but occurred as data.

function y2(x){ x=(x < 500)?x+1900:x; return String(x).substring(2,4) }


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.

2. Error Line 149, Column 25: XML Parsing Error: StartTag: invalid element name.

function y2(x){ x=(x < 500)?x+1900:x; return String(x).substring(2,4) }