Closed Bug 342299 Opened 13 years ago Closed 13 years ago
An image inside a noscript tag is loaded when using XHTML 1
.1 and Content-type is "application/xhtml+xml"
Component: General → Layout
Product: Firefox → Core
QA Contact: general → layout
Version: unspecified → 1.8 Branch
Do you get an alert with this testcase? I don't get an alert with the testcase.
In the testcase you have done I don't get any alert, because the testcase Content-type is text/html, and the problem only occurs when the Content-type is "application/xhtml+xml". In http://caminodesantiago.consumer.es/xhtml1.1/testcase/ I have the same testcase you have done, but with a "Content-type: application/xhtml+xml", and I do get an alert message with the "loaded" text. See http://caminodesantiago.consumer.es/xhtml1.1/testcase/ (which is served with the correct Content-type from the server)
Ah, sorry, I'm an idiot, I didn't read too well. In text/html, the contents of <noscript> are text, no dom is created. In application/xhtml+xml, the content of <noscript> is generated as a dom, since we're talking about xml here. See the code where this happens: http://lxr.mozilla.org/seamonkey/source/parser/htmlparser/src/nsHTMLTokenizer.cpp#749 So I think this bug is invalid.
Assignee: nobody → mrbkap
Component: Layout → HTML: Parser
OS: Linux → All
QA Contact: layout → parser
Version: 1.8 Branch → Trunk
The noscript tag has display: none css rule, which is why it is invisible when scripts are working. In application/xhtml+xml, the contents of the noscript tag need to be build up as a dom, because that's a requirement of xml (I don't know where to find that's a requirement, though). The content of display:none elements still get loaded (iframe, img, etc), this is necessary to not break the web, afaik. html4.01 spec of noscript: http://www.w3.org/TR/html401/interact/scripts.html#h-18.3.1 They only talk about not rendering of the content, which is what Mozilla is doing. the whatwg is not saying anything yet: http://whatwg.org/specs/web-apps/current-work/#the-noscript So what Mozilla is doing in xml mode is probably correct, and what it is doing in html mode (by treating the content of noscript tags as text) is probably a quirk, to not break the web.
Ok, thanks for the explanation, you can consider the bug as invalid, so I close it. Thanks a lot!
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.