Closed Bug 372115 Opened 18 years ago Closed 14 years ago

appendChild() causes page to load forever if it tries to append Childdata with JS in it.

Categories

(Core :: DOM: Core & HTML, defect)

1.8 Branch
x86
Windows 2000
defect
Not set
major

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: T.Hamm, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; de; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2 If I use the DOM-method appendChild to grap content from a webpage and the content (e.g. a div-container) contains specific JS-Code (only fails with write and writeln), the page will load forever. Happens only with FF > 2, works fine with FF 1.xx I'll include a test scenario including the Workaround I use. With the workaround it is working fine in both versions. Reproducible: Always Steps to Reproduce: 1. 2. 3. <html> <head> <title>test1</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> </head> <body> <div id="take_from_here"> TEST TEST TEST <script type="text/javascript"> document.write("<br/>js within div"); </script> </div> <div id="include_here"></div> <script type="text/javascript"> var newdiv = document.createElement("div"); newdiv.innerHTML = document.getElementById("take_from_here").innerHTML; document.getElementById("include_here").appendChild(newdiv); //WORKAROUND, use the following line instead of appendChild //document.getElementById("include_here").innerHTML += newdiv.innerHTML; </script> </body> </html>
Severity: critical → major
Version: unspecified → 2.0 Branch
Assignee: nobody → general
Component: General → DOM
Product: Firefox → Core
QA Contact: general → ian
Version: 2.0 Branch → 1.8 Branch
Assignee: general → nobody
QA Contact: ian → general
WFM. Might have been related to bug 81980.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.