Closed Bug 443270 Opened 17 years ago Closed 17 years ago

innerHTML and residual-style parsing interact in unexpected ways

Categories

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

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 381808

People

(Reporter: andrew.neretin, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9) Gecko/2008052906 Firefox/3.0 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9) Gecko/2008052906 Firefox/3.0 If you have div element inside <em> tag, and then placing it's content into a javascript variable and then place it back from variable into the div, content looks like <em>content</em>. More details in the code listing Reproducible: Always Steps to Reproduce: 1. <em> <div id='some_div'>test</div> </em> 2. javascript code: alert(document.getElementById('some_div').innerHTML); //returns 'test' var str = document.getElementById('some_div').innerHTML; alert(str); //returns 'test' document.getElementById('some_div').innerHTML = str; alert(document.getElementById('some_div').innerHTML); //returns '<em>test</em> Actual Results: some_div.innerHTML = "<em>test</em>"; Expected Results: some_div.innerHTML = "test";
Component: General → DOM
Product: Firefox → Core
QA Contact: general → general
Summary: Content of the div is placed into <em> tag → innerHTML and residual-style parsing interact in unexpected ways
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.