Encoding of ampersands in GET requests
Well I’ve just learn’t something new!
Basically, the following HTML is incorrect:
<a href="http://www.example.com/index.cgi?foo=bar&moo=poo">Click me</a>
and the following is correct:
<a href="http://www.example.com/index.cgi?foo=bar&moo=poo">Click me</a>
According to this article you should encode ampersands in querystrings (when in an HTML document) as entitiy references (&). I can now go to bed a happy man










June 21st, 2005 09:27
yeah, I fell foul of that one when i tried to get past the w3c validator !
June 24th, 2005 01:11
Annoying when you code 50 pages in notepad to find that out!
July 12th, 2005 10:06
See http://www.w3.org/TR/xhtml1/#C_12 for more.