Summary: | responseXML from AJAX request renames <image> tags to <img> | ||
---|---|---|---|
Product: | [Applications] konqueror | Reporter: | Christopher Staite <chris> |
Component: | khtml parsing | Assignee: | Konqueror Developers <konq-bugs> |
Status: | RESOLVED UNMAINTAINED | ||
Severity: | normal | CC: | kde, maksim, porten |
Priority: | NOR | ||
Version: | 3.5.7 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Christopher Staite
2007-09-11 12:52:56 UTC
Ugh. I can believe that. The problem is probably[1] that we assign each element's local name an ID, and <img> and <image> get mapped to the same one for backwards (we are talking html3 or something) compatibility reasons. Which is sort of reasonable for HTML, but since the IDs are used for other namespaces... Seems like this should be done in some special way by the html parser only. (same for other legacy mappings like <anchor> -> <a>, <listing> -> <pre>). A reasonably option may be to give them own IDs, and use the factory code in the parser (why does it exist, anyway?) to create HTMLImageElement or whatever for them. [1] Unless it's due to our "creative" (aka quite buggy) namespace handling A fun testcase to ponder (actually Opera 9.21 renders it as we do!): <style> image#i1 { border: 10px solid red; } img#i2 { border: 10px solid green; } </style> <image id="i1" src="http://bugs.kde.org/media/images/kde_gear_64.png"> <image id="i2" src="http://bugs.kde.org/media/images/kde_gear_64.png"> <script> alert(document.createElement("image").nodeName); </script> A nicer(?) testcase: <?xml version="1.0" encoding="UTF-8"?> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:tst="http://bugs.kde.org/show_bug.cgi?id=149771"> <style> @namespace tst url(http://bugs.kde.org/show_bug.cgi?id=149771); tst|image[attr=i1] { background-color:green; } tst|img[attr=i1] { background-color:red; } tst|img[attr=i2] { background-color:green; } tst|image[attr=i2] { background-color:red; } </style> <div><tst:image attr="i1">This should be green</tst:image></div> <div><tst:img attr="i2">This should be green</tst:img></div> </html> As of rev 867535 (future KDE 4.2) "image" and "img" are not treated the same anymore so your problem should be fixed. But now support for the legacy <image> has to be restored... Message from the Bugsquad and Konqueror teams: This bug is closed as outdated, as we do not have the manpower to maintain the KDE3 version anymore. If you still can reproduce this issue with Konqueror 4.8.4 or later, please open a new report. Thank you for your understanding. |