Closed
Bug 644196
Opened 15 years ago
Closed 15 years ago
innerHTML truncates after 200 document levels when document is not XHTML
Categories
(Core :: DOM: HTML Parser, defect)
Core
DOM: HTML Parser
Tracking
()
RESOLVED
DUPLICATE
of bug 354161
People
(Reporter: gargaj, Unassigned)
References
()
Details
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0
Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0
Under Firefox 4.0, feeding a string into an element's innerHTML will cause the innerHTML to be truncated after 200 document levels if the tag isn't a standard XHTML element, even when XML is specified. This also happens with empty clolsing tags. This didn't happen in 3.x.
Reproducible: Always
Steps to Reproduce:
1. Open http://dl.dropbox.com/u/3417034/ff4test.html
Actual Results:
The output ends with <something num="199">
Expected Results:
The output SHOULD end with <something num="299">
This doesn't happen if the tags are changed to standard tags like "input" or "br", or if the closing tags are specified explicitly (<something num='123'/></something>)
Again, Firefox 3.x didn't have this behaviour.
Interestingly, after a few tests, I found the following:
<ehsk/><ehsk/><ehsk/>
becomes
<ehsk><ehsk><ehsk></ehsk></ehsk></ehsk>
When parsed, which is clearly wrong - they should be siblings in the tree, not children.
Component: General → DOM: Core & HTML
Product: Firefox → Core
QA Contact: general → general
Comment 2•15 years ago
|
||
> even when XML is specified.
None of your tests use XML.
> which is clearly wrong
No, that's correct parsing in HTML. Those are unclosed tags.
I assume that all that's happening here is the tag misnesting protections from the parser kicking in. Henri?
Component: DOM: Core & HTML → HTML: Parser
QA Contact: general → parser
I updated the test to be valid compliant XHTML, the bug still remains - the input string already was valid XML. The browser signals it parses them in Standards Compliant Mode.
Comment 4•15 years ago
|
||
> I updated the test to be valid compliant XHTML,
It's not compliant XHTML. XHTML 1.0 says that XHTML documents can only be sent as text/html if they comply with Appendix C of that specification, which this document does not.
Or put more simply, if it's sent as text/html, then it's treated as HTML. If you want it treated as XHTML, you need to send it as application/xhtml+xml.
Updated•15 years ago
|
Version: unspecified → Trunk
Comment 5•15 years ago
|
||
(In reply to comment #2)
> I assume that all that's happening here is the tag misnesting protections from
> the parser kicking in. Henri?
Yeah, that should be it.
Updated•15 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
OS: Windows 7 → All
Hardware: x86 → All
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•