commit 13759a56ddc762bb40c2ccd0a86acbdb1d8f6d4e
parent c4da088220929b63af5e36915f1225d24706df14
Author: Davide P. Cervone <dpvc@union.edu>
Date: Wed, 17 Apr 2013 07:51:16 -0400
Handle script tags properly in HTML.Element() so they work in IE. Resolves issue #342.
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git 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]));
}