Closed Bug 526482 Opened 15 years ago Closed 15 years ago

nested tags parsed incorrectly (occasionally)

Categories

(Core :: DOM: HTML Parser, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 324875

People

(Reporter: j.gizmo, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_1; en-us) AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9 Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.3a1pre) Gecko/20091104 Minefield/3.7a1pre In rare circumstances, the parser incorrectly parses nested tags. I have created a web page to reproduce the rare circumstances. sometimes the simple markup: <b> <p> a </p> </b> is, according to firebug, incorrectly parsed as: <b> </b><p><b> a </b></p><b> </b> (possibly leading to incorrect CSS-Styles) The problem seems to occur especially when the network connection is slow and firefox starts rendering before all the html is available. i could reproduce it only if a <p>-tag is inside a typical inline tag (<a>, <b>, <i>, <em>, ...) Reproducible: Sometimes Steps to Reproduce: 1. go to http://chc.sbg.ac.at/bug.php 2. look at all the a's Actual Results: some of the a's are red Expected Results: all a's should be grey The bug occurs on every configuration of Firefox i can test: Mac OS (Firefox 3.5.3 and most recent alpha), Ubuntu (Firefox 3.0.15), Windows (several versions of Firefox 2 and 3)
This is a side-effect of how our HTML parser works: it depends on packet boundaries. If you enable the HTML5 parser, it does the right thing. For more fun, reload your page a few times in a row to see how packet boundaries affect the parser. I'm duping your bug to the bug that would make us consistent, but you really want the HTML5 parser.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
i'm sorry for reporting a duplicate bug. on the other hand, a search term like "Make nsHTMLTokenizer::ScanDocStructure deterministic" just didn't occur to me when I looked for possible duplicates....
Yeah, no problem. Like I said, the bug I duped this to is not *really* the proper bug to dupe it to, it's just a convenient place to stick it. This bug is really asking for us to do "residual style" parsing in a different way, which we're doing with the HTML5 parser (but I can't find the bug at the moment).
You need to log in before you can comment on or make changes to this bug.