This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
If a document has a link element in the head with a query string the validator will reject it if the query string contains '&'. For example: <link rel="stylesheet" type="text/css" href="/css/main.css?_debugResources=y&n=1301223807152"> When I validate a document containing this I get: "& did not start a character reference. (& probably should have been escaped as &.)"
This is the correct behavior. Literal '&' must be escaped as '&' EVEN INSIDE URLS.
In HTML5, when HTML syntax is used, the construct is valid, because the syntax rules forbid only “ambiguous ampersands”: http://www.w3.org/TR/html5/syntax.html#attributes-0 The ampersand is not ambiguous in this case, or in other common cases where a query part of a URL contains fields separated by ampersands. An “ambiguous ampersand” is by definition “a U+0026 AMPERSAND character (&) that is followed by one or more alphanumeric ASCII characters, followed by a ";" (U+003B) character, where these characters do not match any of the names given in the named character references section”. There is no semicolon here.
known issue