You can't use document.write in an xml document. The reason why you're getting the error is probably because Mozilla treats it as an E4X statement. So I think this is invalid.
I apologize for using the document.write, since my whole point was to use innerHTML, which I understand is now valid for XML pages in FF. I have rewritten http://www.wallabyrex.net/math/test-innerHTML-mathml.xml to demonstrate the error with the entity, not MathML.
Created attachment 210797 [details] testcase So basically something like this should work, I guess. It works for html entity references, and because I use a mathml doctype, I think this should also work for mathm entity references. But as you can see in this case, it doesn't work for mathml entity references.
Assignee: nobody → general
Component: General → DOM
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → Trunk
Created attachment 214447 [details] Testcase using just XHTML I do not think it is a question of MathML. Simply a question of .innerHTML not taking DTDs from the main document into consideration. Here is a testcase using just XHTML.
I believe this is a parser issue? innerHTML calls nsRange, which calls the Parser. (my personal deal in this is, that I would like to run the S5 slide system in XHTML files... this bug stops that)
I talked with Pike and sicking on IRC. This is a generic problem as I suspected, not just MathML.
Status: UNCONFIRMED → NEW
Component: DOM → XML
Ever confirmed: true
Summary: An undefined entity error when using innerHTML and mathml → innerHTML does not handle entities
It's not a document.write problem, but a innterHTML problem. It affects Gecko in general. The solution is to serve documents as HTML or to use static content. I think it's a parser problem.
Summary: innerHTML does not handle entities → innerHTML setter does accept all entities (e.g. MathML's ∫)
According to bug 445166 comment 3, this is INVALID per HTML5.
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.