View Ticket
Not logged in
Ticket Hash: 0049db245ef59671d4fcefd45c02e37a70e2b622
Title: Firefox HTML Validator thinks all pages are full of errors
Status: Open Type: Code_Defect
Severity: Cosmetic Priority:
Subsystem: Resolution: Open
Last Modified: 2010-03-03 06:16:12
Version Found In:
Description:
I habitually install the HTML Validator add-on in Firefox, which provides fast feedback on the currently loaded page. The current version of that add-on (0.8.6.1) believes that every page generated by fossil has numerous errors.

Many of these errors appear to stem from it not recognizing the DOCTYPE, which is likely because the DTD it names is spelled wrong: 

<verbatim>"-//W3C/DTD XHTML 1.0 Strict//EN"</verbatim>

should be 

<verbatim>"-//W3C//DTD XHTML 1.0 Strict//EN"</verbatim>

according to the list of "official" DTD names found at [http://www.w3.org/QA/2002/04/valid-dtd-list.html|the W3C]. (Note the extra slash between W3C and DTD.) As a red herring, the URL mentioned is at the alternate domain x3.org instead of the standard w3.org, but that isn't causing the issue.

With that corrected (at line 94 of style.c) then the number of errors is much lower, but still significant. Typical examples (from the 12 or so listed for the home page of a clone of the fossil-scm.org repository) include:

  *  The <tt>link</tt> tags are all missing end tags.
  *  The <tt>img</tt> tags are all missing end tags.
  *  The <tt>nobr</tt> is not in the standard.
  *  There is a <tt>table</tt> element using the nonstandard <tt>hspace</tt> attribute.
  *  There is one or more extra <tt>ul</tt> end tags.
  *  There is at least one <tt>hr</tt> tag missing its end tag.
  *  There is at least one <tt>h3</tt> tag inside the span of a <tt>p</tt> tag.

Some of these are probably correctable in the .wiki source text for this particular page, but some appear to result from the wiki translation itself.

If the DOCTYPE is going to be XHTML Strict, then it would seem to make sense to clean up the generated HTML so that it passes a validation suite. I've rated this as Cosmetic, although there are probably implications for accessibility applications (screen readers) which could be more serious than that.

<hr><i>anonymous added on 2010-03-03 06:16:12:</i><br>
I'm not the original poster, I'm just adding some info.

Ticket <a href="http://www.fossil-scm.org/fossil/tktview?name=feb61a11a0">feb61a11a0f8f911d72347daf334b76766e3a66a (XHTML standard compliance)</a> was related to this ticket.

But this one is more up-to-date and brings more information.