Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

w3c markup validator ampersand (&) error

Is there any workaround for the w3c validation error for an & present in urls or some other place in HTML markup?
It says:

& did not start a character reference. (& probably should have been escaped as &.)

The ampersand in my case is a part of a url for gravatar thumbnail. This is the problematic part of a url:

c91588793296e2?s=50&d=http%3A%2F%.

like image 684
crodjer Avatar asked Dec 14 '10 16:12

crodjer


2 Answers

for each & sign you got write & in your example it would be:

c91588793296e2?s=50&d=http%3A%2F%
like image 184
AmokHuginnsson Avatar answered Oct 04 '22 00:10

AmokHuginnsson


Use & for literal ampersands, even in URLs.

http://htmlhelp.com/tools/validator/problems.html#amp

like image 34
Jonny Buchanan Avatar answered Oct 04 '22 02:10

Jonny Buchanan