more optimizations
This commit is contained in:
@@ -549,10 +549,10 @@ class WTVClientSessionData {
|
||||
} else {
|
||||
if (path && expires && data) {
|
||||
var cookie_data = {};
|
||||
cookie_data['cookie'] = unescape(data);
|
||||
cookie_data['expires'] = unescape(expires);
|
||||
cookie_data['path'] = unescape(path);
|
||||
cookie_data['domain'] = unescape(domain);
|
||||
cookie_data['cookie'] = decodeURIComponent(data);
|
||||
cookie_data['expires'] = decodeURIComponent(expires);
|
||||
cookie_data['path'] = decodeURIComponent(path);
|
||||
cookie_data['domain'] = decodeURIComponent(domain);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@@ -608,7 +608,7 @@ class WTVClientSessionData {
|
||||
/*
|
||||
var outstring = "";
|
||||
Object.keys(cookie_data).forEach(function (k) {
|
||||
outstring += k + "=" + escape(cookie_data[k]) + "&";
|
||||
outstring += k + "=" + encodeURIComponent(cookie_data[k]) + "&";
|
||||
});
|
||||
return outstring.slice(0, outstring.length - 1);
|
||||
*/
|
||||
|
||||
@@ -1548,13 +1548,13 @@ class clientShowAlert {
|
||||
*/
|
||||
getURL() {
|
||||
let url = "client:ShowAlert?";
|
||||
if (this.message) url += `message=${escape(this.message)}&`;
|
||||
if (this.buttonlabel1) url += `buttonlabel1=${escape(this.buttonlabel1)}&`;
|
||||
if (this.buttonaction1) url += `buttonaction1=${escape(this.buttonaction1)}&`;
|
||||
if (this.buttonlabel2) url += `buttonlabel2=${escape(this.buttonlabel2)}&`;
|
||||
if (this.buttonaction2) url += `buttonaction2=${escape(this.buttonaction2)}&`;
|
||||
if (this.image) url += `image=${escape(this.image)}&`;
|
||||
if (this.sound) url += `sound=${escape(this.sound)}&`;
|
||||
if (this.message) url += `message=${encodeURIComponent(this.message)}&`;
|
||||
if (this.buttonlabel1) url += `buttonlabel1=${encodeURIComponent(this.buttonlabel1)}&`;
|
||||
if (this.buttonaction1) url += `buttonaction1=${encodeURIComponent(this.buttonaction1)}&`;
|
||||
if (this.buttonlabel2) url += `buttonlabel2=${encodeURIComponent(this.buttonlabel2)}&`;
|
||||
if (this.buttonaction2) url += `buttonaction2=${encodeURIComponent(this.buttonaction2)}&`;
|
||||
if (this.image) url += `image=${encodeURIComponent(this.image)}&`;
|
||||
if (this.sound) url += `sound=${encodeURIComponent(this.sound)}&`;
|
||||
if (this.noback) url += "noback=true&";
|
||||
return url.slice(0, -1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user