W3C home > Mailing lists > Public > www-validator@w3.org > May 2012

Re: Ampersand Errors

From: Etienne Miret <etienne.miret@ens-lyon.org>
Date: Sat, 26 May 2012 18:20:18 +0200
Cc: www-validator@w3.org
Message-Id: <CDDC1FBD-86EE-4F0D-ADFA-8DEAA9D07B52@ens-lyon.org>
To: Mervyn Waine <petraandcarly@me.com>
Hello Petra,

The ampersand is a special character in HTML, just like ‘<’ and ‘>’. So when you need to have a plain ampersand in your page you need to write “&amp;”.

For example, in your site homepage, on line 197, you put:
> <a href="http://www.lulu.com/shop/search.ep?type=&keyWords=Petra+Ceason&x=11&y=8&sitesearch=lulu.com&q=">

You probably meant:
> <a href="http://www.lulu.com/shop/search.ep?type=&amp;keyWords=Petra+Ceason&amp;x=11&amp;y=8&amp;sitesearch=lulu.com&amp;q=">

Note that since the character entities “&keyWords;”, “&x;”, “&y;”, “&sitesearch;” and “&q;” don’t exist, most browser and search engines will assume that you meant to use a plain ampersand instead of including entities, and thus, the link will usually work. But it won’t validate.


Le 26 mai 2012 เ 17:48, Mervyn Waine a ้crit :
> Etienne,
> Thank you for your prompt reply, and assurance that simple use of hyphens is allowed.
> Naturally I want to eliminate the ampersand errors.
> Could you possibly explain your phrase, 'ampersands inside URLs that aren’t escaped as "&amp;".'
> Maybe give me an example of the error, and how to correct it.
> My Site-checker never mentioned ampersands, so I knew nothing about the errors.
> Thanks,
> Petra.

Etienne Miret
Received on Saturday, 26 May 2012 16:20:54 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:59:26 UTC