From df61c069a017b02cc873b234209f7d97433662ad Mon Sep 17 00:00:00 2001 From: Sean Hogan Date: Fri, 29 Oct 2010 11:13:39 +1100 Subject: [PATCH] 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. --- mathjax/unpacked/extensions/mml2jax.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mathjax/unpacked/extensions/mml2jax.js b/mathjax/unpacked/extensions/mml2jax.js index 426ebc2eb..f9fbe3e69 100644 --- 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:"x"}).childNodes.length !== 1) // IE < 9 corrupts MathML + }); } }); - + MathJax.Hub.Register.PreProcessor(["PreProcess",MathJax.Extension.mml2jax]); MathJax.Ajax.loadComplete("[MathJax]/extensions/mml2jax.js");