Closed
Bug 293653
Opened 20 years ago
Closed 15 years ago
anomolous rendering of badly nested <span> and <i> tags
Categories
(Core :: DOM: HTML Parser, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: scnaifeh, Unassigned)
Details
(Keywords: testcase)
Attachments
(1 file)
|
244 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.7) Gecko/20050414 Firefox/1.0.3 Where html code has <span> and <i> tags which are improperly nested (i.e. <i><span></i></span>, text following </span> does not revert to the style of text before the <span> but seems to revert to a default style. Of course, this is in fact bad html coding, but it is commonly produced by the WestLaw information service used by lawyers. The problem is illustrated in the following short sample of code: <HTML> <HEAD> <title>mozilla span bug</title> </HEAD> <body style="font-size:100%; font-family:Verdana,Helvetica,sans-serif; color:#000000;"> <span style="font-size:0.80em; font-family:Verdana,Helvetica,sans-serif"> Normal Text <i><span style="background:#FFFF00; font-weight:bold" title="SearchTerm">Highlighted Text</i></span> More normal text. </span> </body> </HTML> Reproducible: Always Steps to Reproduce: 1. Create an html document containing the code contained in Details. 2. Load it into foxfire. Actual Results: the text "More Normal Text" appears in the default body style rather than in the style specified in the outer <span> tag. Expected Results: FoxFire should have reverted to the style specified in the outer <span> tag when rendering the text after the inner </span> tag, as it does if the <i> is moved after the inner <span>, or the </i> is moved after the innter </span>.
Moving to Core product.
Assignee: nobody → parser
Component: General → HTML: Parser
Product: Firefox → Core
QA Contact: general → mrbkap
Version: unspecified → Trunk
Comment 2•20 years ago
|
||
This is the testcase given in the report as an attachment with modified styles to make the bug a bit easier to see.
Comment 3•20 years ago
|
||
As a note, this might end up being a WONTFIX (or INVALID or whatever).
Comment 4•19 years ago
|
||
(In reply to comment #2) > Created an attachment (id=183260) [edit] > testcase This test "<span>Normal<i><span>Highlighted</i></span>More normal</span>" code becomes a "<span>Normal<i><span>Highlighted</span></i></span>More normal" chunk after applied DWIM (in a Mozilla 1.5 beta 1, anyway); I just tested by peeking at the DOM, on encountering the same problem in another page with the nesting "<form><center></form></center><form></form>" and turned into the less fortunate "<form><center></center><form></form></form>", rather than the more preferrable "<form><center></center></form><form></form>". Amazingly, both forms in the page still work, though, until a script modifies the DOM slightly (it's enough to set the parentNode.innerHTML to itself, yielding the second version, which breaks). (I /think/ this is the same bug at work. If not, I probably ought to have made a new ticket myself, yes.)
Updated•15 years ago
|
Assignee: parser → nobody
QA Contact: mrbkap → parser
WONTFIX per HTML5. If you disagree, please file a bug against the HTML5 spec in the W3C's Bugzilla citing specific real-world site compatibility problems.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•