commit 71f731cbbb9038162fe171befcf2771cbb5733e0
parent ae3197913bc9b45d9826502f53388b15305acfe5
Author: Davide P. Cervone <dpvc@union.edu>
Date: Thu, 22 May 2014 18:10:35 -0400
Trap error reading cookies. Resolves issue #821.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/unpacked/MathJax.js b/unpacked/MathJax.js
@@ -1079,7 +1079,8 @@ MathJax.HTML = {
Get: function (name,obj) {
if (!obj) {obj = {}}
var pattern = new RegExp("(?:^|;\\s*)"+this.prefix+"\\."+name+"=([^;]*)(?:;|$)");
- var match = pattern.exec(document.cookie);
+ var match;
+ try {match = pattern.exec(document.cookie)} catch (err) {}; // ignore errors reading cookies
if (match && match[1] !== "") {
var keys = unescape(match[1]).split('&;');
for (var i = 0, m = keys.length; i < m; i++) {