[Trac-tickets] [The Trac Project] #1010: Trac does not validate as HTML and content-type problems

The Trac Project noreply at edgewall.com
Wed Dec 1 10:57:10 EST 2004


#1010: Trac does not validate as HTML and content-type problems
---------------------------------+------------------------------------------
       Id:  1010                 |      Status:  new                     
Component:  mod_python frontend  |    Modified:  Wed Dec  1 10:57:09 2004
 Severity:  normal               |   Milestone:                          
 Priority:  normal               |     Version:  0.8                     
    Owner:  cmlenz               |    Reporter:  anonymous               
---------------------------------+------------------------------------------
 I have run a few Trac pages through the W3C's validator and although all
 of Trac's documents assert that they are XHTML 1.0 Strict, they are not.

 See http://validator.w3.org/check?uri=http://projects.edgewall.com/trac
 for an example.

 Perhaps a solutions to this would be to use XHTML 1.0 Transitional and
 improve some of the dynamic markup a little.

 An example is as follows:

     <ul class="changes"></ul>

 (as apears on Line 210, column 27,
 http://projects.edgewall.com/trac/ticket/323)

 This is NOT valid XHTML as the UL element need child LI elements to be
 complete.

 Would it be hard to rectify this situation, or would it help you used a
 more forgiving DOCTYPE.

 Related to this issue is the fact that you are serving (on your site at
 least) your XHTML with the following header:

 Content-Type: text/html;charset=utf-8

 This is what *most* other people's servers will be doing as well, and it
 can be near on impossible for some people to change.

 XHTML should be served as Content-Type application/xhtml+xml

 You can read more about this at http://www.hixie.ch/advocacy/xhtml

 Here is an excerpt:

 "If you use XHTML, you should deliver it with the application/xhtml+xml
 MIME type. If you do not do so, you should use HTML4 instead of XHTML.
 The alternative, using XHTML but delivering it as text/html, causes
 numerous problems that are outlined below.

 Unfortunately, IE6 does not support application/xhtml+xml (in fact, it
 does not support XHTML at all)."

 Perhaps it would be better to write the pages in HTML 4.01 untill XHTML is
 better supported by user-agents.

-- 
Ticket URL: <http://projects.edgewall.com/trac/ticket/1010>
The Trac Project <>


More information about the Trac-Tickets mailing list