Replace illegal character used in cookie name (again).
git-svn-id: https://mathjax.svn.sourceforge.net/svnroot/mathjax/trunk@596 b8fd5906-0fad-46e2-a0d3-10d94ff285d1
This commit is contained in:
parent
3a43c9b273
commit
f33232b0cf
mathjax
File diff suppressed because one or more lines are too long
|
@ -944,7 +944,7 @@ MathJax.HTML = {
|
||||||
keys.push(id+":"+def[id].toString().replace(/&/g,"&&"));
|
keys.push(id+":"+def[id].toString().replace(/&/g,"&&"));
|
||||||
}}
|
}}
|
||||||
}
|
}
|
||||||
var cookie = this.prefix+"/"+name+"="+escape(keys.join('&;'));
|
var cookie = this.prefix+"."+name+"="+escape(keys.join('&;'));
|
||||||
if (this.expires) {
|
if (this.expires) {
|
||||||
var time = new Date(); time.setDate(time.getDate() + this.expires);
|
var time = new Date(); time.setDate(time.getDate() + this.expires);
|
||||||
cookie += '; expires='+time.toGMTString();
|
cookie += '; expires='+time.toGMTString();
|
||||||
|
@ -958,7 +958,7 @@ MathJax.HTML = {
|
||||||
//
|
//
|
||||||
Get: function (name,obj) {
|
Get: function (name,obj) {
|
||||||
if (!obj) {obj = {}}
|
if (!obj) {obj = {}}
|
||||||
var pattern = new RegExp("(?:^|;\\s*)"+this.prefix+"/"+name+"=([^;]*)(?:;|$)");
|
var pattern = new RegExp("(?:^|;\\s*)"+this.prefix+"\\."+name+"=([^;]*)(?:;|$)");
|
||||||
var match = pattern.exec(document.cookie);
|
var match = pattern.exec(document.cookie);
|
||||||
if (match && match[1] !== "") {
|
if (match && match[1] !== "") {
|
||||||
var keys = unescape(match[1]).split('&;');
|
var keys = unescape(match[1]).split('&;');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user