| Summary: | [test case] <p> ended at <noscript> | ||
|---|---|---|---|
| Product: | [Applications] konqueror | Reporter: | Thomas Friedrichsmeier <thomas.friedrichsmeier> |
| Component: | khtml parsing | Assignee: | Konqueror Bugs <konqueror-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Debian testing | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | test case | ||
*** This bug has been marked as a duplicate of 47241 *** Sorry, I don't think this is a duplicate of 47241. It may be related internally, I don't know about that, but it does seem to me to be an entirely different matter. This bug has nothing to do with withespace-handling. The essence of this bug is, that an opening "<noscript>"-tag should not be considered as closing a <p>-tag that it's located inside. I.e. the minimal testcase is the following (regardless of whether javascript is enabled or disabled): <p align="right">This is right-aligned <noscript>and</noscript> this should be right-aligned, too, since it should be the same paragraph.</p> This is a different situation from 47241. It's simply, that the <noscript>-tag should not close the paragraph, same as a <script>-tag does not close the containing <p> either. The rendering _inside_ the <noscript/>-section is not the problem here (I admit, the bug is somewhat mistitled). Still present in 3.2.2 Created attachment 8335 [details]
test case
but you're aware it's illegal HTML, aren't you? Hmm, accordind to selfhtml you can not use <noscipt> in <p> but in these blockelements: applet | blockquote | body | button | center | dd | del | div | fieldset | form | iframe | ins | li | map | noframes | noscript | object | td | th So the example seems to be wrong html. But what about real world sites? :-} Bye Thorsten real world sites don't care about legal HTML. Opera has same behavior as Firefox SVN commit 549401 by carewolf:
Allow noscript in P like Firefox and Opera
BUG:65546
M +2 -2 dtd.cpp
--- branches/KDE/3.5/kdelibs/khtml/html/dtd.cpp #549400:549401
@@ -599,8 +599,8 @@
// _1 *
return check_array(childID, tag_list_1) || check_array(childID, tag_list_6);
case ID_P:
- // P: ( _0 | TABLE ) *
- return check_array(childID, tag_list_0) || (!strict && childID == ID_TABLE);
+ // P: ( _0 | TABLE | NOSCRIPT) *
+ return check_array(childID, tag_list_0) || (!strict && (childID == ID_TABLE || childID == ID_NOSCRIPT));
case ID_H1:
case ID_H2:
case ID_H3:
|
Version: (using KDE KDE 3.1.4) Installed from: Debian testing/unstable Packages Consider the following short example html-code: <html> <body> <p>There should not be a <script type="text/javascript"> <!-- document.write ("break"); //--> </script> <noscript>break</noscript> in this paragraph!</p> </body> </html> Konqueror will put a linebreak in the paragraph. This occurs regardless of whether javascript is turned on or off. The break seems to arise at the opening <noscript>-tag. Indeed, the <noscript>-tag seems to be the culprit: even if the <script>...</script> section is removed, there will still be a line break at the opening <noscript>-tag, while the problem goes away, if you remove the <noscript/>-section only. Further, if you put an align="center" in the opening <p>-tag, you will note, that obviously the whole paragraph gets closed at the <noscript>-tag (the first half of the paragraph will be centered, the second half on a separate line will be left-aligned). Renders as expected (no line/paragraph break) in Mozilla 1.4.