From 13759a56ddc762bb40c2ccd0a86acbdb1d8f6d4e Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Wed, 17 Apr 2013 07:51:16 -0400 Subject: [PATCH] Handle script tags properly in HTML.Element() so they work in IE. Resolves issue #342. --- unpacked/MathJax.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/unpacked/MathJax.js b/unpacked/MathJax.js index 7468cc311..79f29e22e 100644 --- a/unpacked/MathJax.js +++ b/unpacked/MathJax.js @@ -32,7 +32,7 @@ if (!window.MathJax) {window.MathJax= {}} if (!MathJax.Hub) { // skip if already loaded MathJax.version = "2.1"; -MathJax.fileversion = "2.1.2"; +MathJax.fileversion = "2.1.3"; /**********************************************************/ @@ -977,6 +977,8 @@ MathJax.HTML = { for (var i = 0; i < contents.length; i++) { if (contents[i] instanceof Array) { obj.appendChild(this.Element(contents[i][0],contents[i][1],contents[i][2])); + } else if (type === "script") { // IE throws an error if script is added as a text node + this.setScript(obj, contents[i]); } else { obj.appendChild(document.createTextNode(contents[i])); }