Summary: | mod_autoindex is generating invalid XHTML markup | ||
---|---|---|---|
Product: | Apache httpd-2 | Reporter: | Jose Kahan <jose> |
Component: | mod_autoindex | Assignee: | Apache HTTPD Bugs Mailing List <bugs> |
Status: | REOPENED --- | ||
Severity: | trivial | ||
Priority: | P2 | ||
Version: | 2.2.21 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | FreeBSD | ||
Attachments: |
mod_autoindex was not adding the xhtml namespace
mod_autoindex was not adding the xhtml namespace |
Description
Jose Kahan
2007-10-18 08:11:12 UTC
Created attachment 21003 [details]
mod_autoindex was not adding the xhtml namespace
Patch against 2.2.6
Created attachment 21004 [details]
mod_autoindex was not adding the xhtml namespace
Patch against trunk
Committed to trunk as r59381 (http://svn.apache.org/viewvc?rev=593778&view=rev). Thanks for the patch. Proposed for backport as r593818 (http://svn.apache.org/viewvc?rev=593818&view=rev). Here's an idea: These autoindexes should not only be valid markup but promote open standards (valid markup) by linking back to W3C's Validator. If you are open to the idea it would be ideal if Apache were to include W3C valid markup logos in the /icons directory so as to distribute load of serving those icons on all the new valid autoindex URIs. In turn we can promote adoption of Apache 2.2, as apparently many are still 1.3, on the Validator's results page eg http://validator.w3.org/check?uri=http%3A//www.w3.org/&doctype=Inline&%20outline= We could give an alternate markup for Apache instances >2.2.N to all users or perhaps just for sites we detect the Server: header as still Apache 1.3 or 2.0 <p> <a href="http://validator.w3.org/check?uri=referer"><img src="/icons/valid-xhtml10" alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a> </p> I don't like it. mod_autoindex is generating invalid XHTML 1.0 Transitional for fancy list. Configuration: IndexOptions Charset=utf-8 XHTML FancyIndexing FoldersFirst VersionSort IndexHeadInsert "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />" HeaderName secret.html ReadmeName secret.html There is problem with hr markups: document type does not allow element "hr" here; missing one of "button", "ins", "del" start-tag You can read it here: http://validator.w3.org/check?uri=http%3a%2f%2fgabrys.biz%2fimages%2f Its should be outside pre markup. They are created in lines 1603-1608 and 1814-1819. Problem can be solved with replece specifed lines: 1604 -> ap_rputs("</pre><hr", r); 1608 -> ap_rputs("><pre>", r); insert ap_rputs("</pre>\n", r); under 1813 1819 ap_rputs(">\n", r); delete 1821, 1822, 1823 I don't test it, because I am a new FreeBSD and Apache user, and I not able to do a lot of things now :/ |