Forum Moderators: phranque

Message Too Old, No Replies

QueryStrings: should I use "&" or "&"?

W3C validator doesn't like ampersands

         

AndrewStuart

12:50 am on Mar 29, 2005 (gmt 0)

10+ Year Member



Hi,

I've been using the HTML validator on www_w3_org to make sure I'm squeaky clean. I've chosen to conform to
<DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
which is at the top of all my scripts and html.

When it checks my QueryStrings string parameters it objects to ampasands seperating variables like:
.asp?aaa=1&yyy=2&zzz=3

It recommends I create then like this:
.asp?aaa=1&amp;yyy=2&amp;zzz=3

But checking my log files I notice hundreds of Server 500 or 404 or bad links because some browers and spiders have taken the links literally - especially when the search engines regurgitate links back to my site. (no probs with IE6 and firefox). So I've gone back to the orginal ampersands. So whats wrong with the 4.01 HTML standard and checker? Or whats going wrong with the site visitors? It seems I cant please everyone.

Anyone had this problem before?

txbakers

3:29 am on Mar 29, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Use the entity for it - &amp; to please the Wc3 validation police