In jQuery 1.2.1, line 783 does this: div = doc.createElement("div")
The attributes that Firefox 2.0.0.7 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: div.innerHTML = wrap[1] + arg + wrap[2]; 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. See http://pastie.caboo.se/101771. Save this code as foo.html and as foo.xml.