Version: (using KDE KDE 3.1.1) Installed from: I Don't Know OS: Linux Summary: element name case is incorrect in XHTML documents Demonstration: Load this page. It has a load handler that puts up an alert box with the body element's tagName. According to http://www.w3.org/TR/xhtml1/#C_11, "User agents that access XHTML documents served as Internet media type text/html via the DOM can use the HTML DOM, and can rely upon element and attribute names being returned in upper-case from those interfaces." However, Konqueror returns the element name in its original case (lowercase for XHTML), even if the media type is text/html. Additional information: - Mozilla, Opera 7.0, and IE 6.0 all get this right. - The second Safari beta also gets this right, so somewhere there's corrective code. It may be in the Konqueror source tree already, but I thought I should report the issue just in case. - I'm running Knoppix from a CD.
Created attachment 1466 [details] test case Oops. I meant, "Load the attached test case."
It showed uppercase (testing with Konqueror from KDE CVS 20030405). The Safari correction you mention has probably been integrated, so I'm closing this bug report. Thank you for your report.
The test case fails (that is, the element name is lowercase) in Konqueror 3.2.1. Reopening.
Apparently Safari's correction to this problem has not in fact been integrated. Maybe Apple needs a little nudge...?
Still broken in 3.2.2.
Still broken in 3.3.
not sure what you see. But I see BODY (with 3.3.2 code base though)
With 3.3.1, the message box says, "document.body.tagName: body". Code from CVS has been reported to work before (see comment #1), but this test has always failed with released code for me. Maybe the fix lives on a branch that never makes it into releases...?
Then you will be pleased about 3.3.2 :) I think, the thing that was fixed was how we react on xhtml served as text/html, we used to see it as invalid. Save the test case as .xhtml and it should work even with 3.3.0
I get the same results whether it's saved as .html or .xhtml. I'm not sure what this tells us, though. Does Konqueror determine the file type from the file extension when loading a file from disk? It doesn't list a Content-Type header under View > View Document Information when a file is loaded from disk. If it does guess content type this way, I'd expect it to treat it as application/xhtml+xml, in which case it would be appropriate for the element names to come back in lowercase (as they always do with versions of Konqueror through 3.3.1). The problem is what happens when the MIME-type is text/html, in which case element names should be promoted to uppercase. Anyway, I'll try again when 3.3.2 comes out. If history is any guide, that could happen sometime in the next month or so.
Test case works for me with 3.3.2. This bug can be closed.