[VE][html5] Add Subject Here

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[VE][html5] Add Subject Here

Neil Whitehead

I have received the error:

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

But the & was part of a url within a href=””, I am thinking there should be an exception for this?

Validating http://www.whitelayer.co.uk/p2/
Error [html5]: ""

Thanks for the validations J
Neil

Reply | Threaded
Open this post in threaded view
|

"& did not start a character reference."

Jukka K. Korpela
2014-08-26 12:45, Neil Whitehead wrote
under Subject: Re: [VE][html5] Add Subject Here:

> I have received the error:
>
> “& did not start a character reference. (& probably should have been
> escaped as &.)”
>
> But the & was part of a url within a href=””, I am thinking there should
> be an exception for this?

For HTML5, the issue is messy and varies from draft to draft. Currently,
in W3C HTML5 LC, the description of HTML parsing (!) rules at
http://www.w3.org/TR/html5/syntax.html#consume-a-character-reference
seem to say, in a fairly complicated manner, that e.g. &display=1 in an
attribute value causes “parse error” – even though browsers are required
to process it so that “&” is taken as just a data character.

> Validating http://www.whitelayer.co.uk/p2/

Just replace any occurrence of “&” in an attribute value by “&”
(unless the “&” is meant to be part of a character reference).

This won’t change anything in page behavior, but it pleases the Validator.

Yucca