Bug 23747 - Directory listings use XHTML syntax in HTML document
Summary: Directory listings use XHTML syntax in HTML document
Status: CLOSED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_autoindex (show other bugs)
Version: 2.0.47
Hardware: All All
: P3 minor (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL: http://www.apache.org/dist/
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-11 19:59 UTC by Liam Quinn
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments
Patch to use HTML syntax for empty elements (2.30 KB, patch)
2003-10-12 18:32 UTC, Liam Quinn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!