Bug 23747

Summary: Directory listings use XHTML syntax in HTML document
Product: Apache httpd-2 Reporter: Liam Quinn <liam>
Component: mod_autoindexAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: CLOSED FIXED    
Severity: minor    
Priority: P3    
Version: 2.0.47   
Target Milestone: ---   
Hardware: All   
OS: All   
URL: http://www.apache.org/dist/
Attachments: Patch to use HTML syntax for empty elements

Description Liam Quinn 2003-10-11 19:59:45 UTC
Directory listings with FancyIndexing use XHTML syntax in an HTML document:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
...
<img src="/icons/text.gif" alt="[TXT]" />
...
<hr />

In HTML, "<hr />" is actually equivalent to "<hr>>" (note the extra ">"). It's
only in XHTML where the slash is used with empty elements. For details on empty
elements in HTML vs. XHTML, see

http://www.cs.tut.fi/~jkorpela/html/empty.html

To fix the problem, don't use the slash in empty elements in HTML:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
...
<img src="/icons/text.gif" alt="[TXT]">
...
<hr>
Comment 1 Liam Quinn 2003-10-12 18:32:46 UTC
Created attachment 8539 [details]
Patch to use HTML syntax for empty elements
Comment 2 André Malo 2003-10-12 21:39:47 UTC
Quick note until someone picks it up. We need an option for switching 
behaviour, because people may use (and do use) their own declaration.

Thanks for your report!
Comment 3 André Malo 2003-11-02 20:40:13 UTC
Fixed the issue in 2.1 and proposed for backport into the 2.0 branch.

Thanks!