diff --git a/www/js/app.js b/www/js/app.js
index 4c337e1d..e6b999f9 100644
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -2710,6 +2710,8 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'util', 'utf8', 'images', 'cooki
function (p0, p1, math) {
// Remove any rogue ampersands in MathJax due to double escaping (by Wikipedia)
math = math.replace(/&/g, '&');
+ // Change any mbox commands to fbox (because KaTeX doesn't support mbox)
+ math = math.replace(/mbox{/g, 'fbox{');
return '';
});
// Deal with any newer MathML blocks
@@ -2717,6 +2719,8 @@ define(['jquery', 'zimArchiveLoader', 'uiUtil', 'util', 'utf8', 'images', 'cooki
function (_p0, p1, _p2, math, p4) {
// Remove any rogue ampersands in MathJax due to double escaping (by Wikipedia)
math = math.replace(/&/g, '&');
+ // Change any mbox commands to fbox (because KaTeX doesn't support mbox)
+ math = math.replace(/mbox{/g, 'fbox{');
return p1 + math + p4 + '';
});
}