Foros del Web » Creando para Internet » HTML »

Validar HTML

Estas en el tema de Validar HTML en el foro de HTML en Foros del Web. Muy buenas, tengo el siguiente problema. Al pasar el http://validator.w3.org/ me da el sigueinte error Cita: An entity reference was found in the document, but ...
  #1 (permalink)  
Antiguo 13/02/2011, 05:34
davidbrepe
Invitado
 
Mensajes: n/a
Puntos:
Pregunta Validar HTML

Muy buenas, tengo el siguiente problema.
Al pasar el http://validator.w3.org/ me da el sigueinte error
Cita:
An entity reference was found in the document, but there is no reference by that name defined. Often this is caused by misspelling the reference name, unencoded ampersands, or by leaving off the trailing semicolon (;). The most common cause of this error is unencoded ampersands in URLs as described by the WDG in "Ampersands in URLs".

Entity references start with an ampersand (&) and end with a semicolon (;). If you want to use a literal ampersand in your document you must encode it as "&" (even inside URLs!). Be careful to end entity references with a semicolon or your entity reference may get interpreted in connection with the following text. Also keep in mind that named entity references are case-sensitive; &Aelig; and æ are different characters.

If this error appears in some markup generated by PHP's session handling code, this article has explanations and solutions to your problem.

Note that in most documents, errors related to entity references will trigger up to 5 separate messages from the Validator. Usually these will all disappear when the original problem is fixed.

Esta claro que el problema es el &
Código HTML:
<a class="thumbnail" href="phpBB3/memberlist.php?mode=viewprofile&u=<?php echo $row_consulta_datos['user_id']; ?>"> 
La solución que me da el validador es ponerlo entre comillas doble , "&", pero así la url no es valida...


Que solución tengo?
Mi DocType es XHTML 1.0 Transitional


Un saludo!
  #2 (permalink)  
Antiguo 13/02/2011, 05:55
Avatar de caricatos
Moderador
 
Fecha de Ingreso: abril-2002
Ubicación: Torremolinos (Málaga)
Mensajes: 19.607
Antigüedad: 22 años
Puntos: 1284
Respuesta: Validar HTML

Hola:

Si es esta letra: "&", codifícala así: "&amp;"

Saludos
__________________
Por favor:
No hagan preguntas de temas de foros en mensajes privados... no las respondo
  #3 (permalink)  
Antiguo 13/02/2011, 08:16
davidbrepe
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Validar HTML

Solucionado muchas gracias!!!

Etiquetas: Ninguno
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 18:51.