Re: css validator breaks html validation

2013-11-14 23:07, Axel Krüner wrote:

> I came across a "bug" while validating a newly built website of mine. It
> concerns the validation link you get after sucessfully validating your
> css, to put it into your w3c css validation icons.

Simple solution: don’t spoil your pages with such icons. They serve no 
useful purpose but cause distraction (and some minor problems that waste 
your time, too, as you have seen). See
http://www.cs.tut.fi/~jkorpela/html/validation.html#icon

> All the special
> characters in that validation link are percent-escaped, exept for the
> ampersands. Those not-escaped ampersands break your html validation.

Well, the CSS Validator tells you which URL (“URI”) to use. You are 
supposed to deal with “&” as usual if you set up a link and you use an 
HTML version that requires you to do something with them.

> I suggest the css validator is adapted accoringly and outputs %amp;
> -escaped ampersands.

It would be incorrect to use & in a URL. The & notation is part 
of HTML, not part of the URL.

Besides, there is a long-standing error in the HTML validator: in HTML5 
mode, it complains about “&” in URL-valued attributes, even though HTML5 
CR allows them (under certain rules) – people who maintain HTML5 drafts 
and people who maintain HTML5 validators don’t quite agree, you know. So 
in fact, you *can* put the URL as such into an href value, as far as a) 
actual browser behavior is concerned and b) conformance to HTML5 rules 
(as opposite to passing the experimental HTML5 validators) is concerned.

Yucca

Received on Friday, 15 November 2013 13:45:45 UTC