Ticket #6878 (closed bug: invalid)
html() has weird behavior for divs nested inside anchors in FireFox
|Reported by:||Xodarap||Owned by:|
|Keywords:||firefox, html, div||Cc:|
When I use the .html() method to set the inner html of a div which is nested inside an a in firefox 3.5, it wraps what I put inside the html with an a. Sample in firebug:
>>> $('div',$('<a><div></div></a>')).html('test').html() "<a>test</a>"
(html should be just plain "test".) This doesn't happen in IE 8 or 7 as far as I can tell. Also doesn't happen if it's a span inside an anchor. I'm using 1.4.2, not sure about other versions.