Skip to content

Commit b590d93

Browse files
committed
[main] sanitize MathJax user configuration
* merge defaults into user configuration Fixes #309
1 parent 85b05d1 commit b590d93

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,9 @@ function ConfigureMathJax() {
473473
}
474474
if (MathJaxConfig) {
475475
adjustArrays(MathJaxConfig);
476-
Insert(window.MathJax,MathJaxConfig);
476+
// merge the defaults into the user configuration (to sanitize)
477+
var currentMathJax = Insert({},window.MathJax);
478+
window.MathJax = Insert(Insert({},MathJaxConfig),currentMathJax);
477479
}
478480
}
479481

0 commit comments

Comments
 (0)