From c5e1e43f1c47d0e825216be3a0dfef8afa3a4856 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Fri, 14 Feb 2014 14:29:41 -0500 Subject: [PATCH] Skip _moz-math-* attributes in Firefox. Resolves issue #328 for now. --- unpacked/extensions/mml2jax.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/unpacked/extensions/mml2jax.js b/unpacked/extensions/mml2jax.js index da57030ef..25efdee03 100644 --- a/unpacked/extensions/mml2jax.js +++ b/unpacked/extensions/mml2jax.js @@ -167,7 +167,7 @@ MathJax.Extension.mml2jax = { html = "<"+node.nodeName.toLowerCase(); for (i = 0, m = node.attributes.length; i < m; i++) { var attribute = node.attributes[i]; - if (attribute.specified) { + if (attribute.specified && attribute.nodeName.substr(0,10) !== "_moz-math-") { // Opera 11.5 beta turns xmlns into xmlns:xmlns, so put it back (*** check after 11.5 is out ***) html += " "+attribute.nodeName.toLowerCase().replace(/xmlns:xmlns/,"xmlns")+"="; var value = attribute.nodeValue; // IE < 8 doesn't properly set style by setAttributes @@ -250,10 +250,12 @@ MathJax.Extension.mml2jax = { }; +// // We register the preprocessors with the following priorities: // - mml2jax.js: 5 // - jsMath2jax.js: 8 // - asciimath2jax.js, tex2jax.js: 10 (default) // See issues 18 and 484 and the other *2jax.js files. +// MathJax.Hub.Register.PreProcessor(["PreProcess",MathJax.Extension.mml2jax],5); MathJax.Ajax.loadComplete("[MathJax]/extensions/mml2jax.js");