Ticket #1753 (closed feature: duplicate)
inconsistent processing for xml vs html
|Reported by:||jacktanner||Owned by:|
In jQuery 1.2.1, line 783 does this:
div = doc.createElement("div")
The attributes that Firefox 220.127.116.11 creates for div are different depending on whether a page is loaded as foo.html or foo.xml. In particular, when the file is XML, there's no div.innerHTML, only div.textContent. This causes a problem down on line 813:
When the file is HTML, that statement assigns a value to both div.innerHTML and div.textContent. When the file is XML, that statement creates div.innerHTML and assigns its value, but does not affect div.textContent.
A workaround is to do this:
I'm not sure if this is a true workaround, because it fails if arg contains any HTML tags.
See http://pastie.caboo.se/101771. Save this code as foo.html and as foo.xml.