diff --git a/unpacked/extensions/toMathML.js b/unpacked/extensions/toMathML.js index 8ea82e383..28135c383 100644 --- a/unpacked/extensions/toMathML.js +++ b/unpacked/extensions/toMathML.js @@ -160,7 +160,7 @@ MathJax.Hub.Register.LoadHook("[MathJax]/jax/element/mml/jax.js",function () { if (annotation) { if (nested) {data.unshift(space+" "); data.push(space+" ")} data.unshift(space+" "); - var xmlEscapedTex = jax.originalText.replace(/([&<>])/g, function(item) { + var xmlEscapedTex = jax.originalText.replace(/[&<>]/g, function(item) { return { '>': '>', '<': '<','&': '&' }[item] }); data.push(space+' '+xmlEscapedTex+"");