commit df61c069a017b02cc873b234209f7d97433662ad
parent fac13ed3516e1d90cdd4b7f81e48492b57300b16
Author: Sean Hogan <shogun70@gmail.com>
Date: Fri, 29 Oct 2010 11:13:39 +1100
IE <= 8 parses MathML incorrectly. MathJax implements an alternative code path to get around this problem. This code was executed for all versions of IE, but IE9 parses MathML correctly, so this fix implements feature detection of MathML parsing.
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mathjax/unpacked/extensions/mml2jax.js b/mathjax/unpacked/extensions/mml2jax.js
@@ -142,10 +142,10 @@ MathJax.Hub.Browser.Select({
MSIE: function (browser) {
MathJax.Hub.Insert(MathJax.Extension.mml2jax,{
msieScriptBug: true,
- msieMathTagBug: true
- })
+ msieMathTagBug: (MathJax.HTML.Element("span", {innerHTML:"<math><mi>x</mi></math>"}).childNodes.length !== 1) // IE < 9 corrupts MathML
+ });
}
});
-
+
MathJax.Hub.Register.PreProcessor(["PreProcess",MathJax.Extension.mml2jax]);
MathJax.Ajax.loadComplete("[MathJax]/extensions/mml2jax.js");