Below is a snippet of JavaScript code that I am working with:
wdata['account'] = {"value": $(input).val(), "title": "Номер карты получения"};
var r = {
"ipayway": ipw_selected,
"wpayway": wpw_selected,
"amount_type": amount_type,
"amount": amount,
"email": email,
"idata": idata,
"wdata": wdata,
"udata": udata
}
console.log(JSON.stringify(r));
document.cookie = "r=" + JSON.stringify(r) + ";";
console.log(document.cookie);
When debugging in Chrome and Firefox, here are the results:
{"ipayway":"3","wpayway":"2","amount_type":"invoice","amount":"10","email":"<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="90e2f5f6f5e2d0f6f1e3e4f5e2bef3fffd">[email protected]</a>","idata":{"phone":{"value":"79111111111","title":"phone"}},"wdata":{"account":{"value":"4444444444444448","title":"Номер карты получения"}},"udata":{}}
_ga=GA1.2.1726207989.1464355649; _ym_uid=1464355650833173718; _ym_isad=2; r%3Dfalse%3B; r={"ipayway":"3","wpayway":"2","amount_type":"invoice","amount":"10","email":"<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c4b6a1a2a1b684a2a5b7b0a1b6eaa7aba9">[email protected]</a>","idata":{"phone":{"value":"79111111111","title":"phone"}},"wdata":{"account":{"value":"4444444444444448","title":"Номер карты получения"}},"udata":{}}; _gat=1; _ym_visorc_37606275=w
In Safari:
{"ipayway":"3","wpayway":"2","amount_type":"invoice","amount":"10","email":"<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="daa8bfbcbfa89abcbba9aebfa8f4b9b5b7">[email protected]</a>","idata":{"phone":{"value":"79111111111","title":"phone"}},"wdata":{"account":{"value":"4444444444444448","title":"Номер карты получения"}},"udata":{}}
r={"ipayway":"3","wpayway":"2","amount_type":"invoice","amount":"10","email":"<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1e6c7b787b6c5e787f6d6a7b6c307d7173">[email protected]</a>","idata":{"phone":{"value":"79111111111","title":"phone"}},"wdata":{"account":{"value":"4444444444444448","title":"A1468837743323372246t%3A1468837754%3A; ga=GA1.2.1861993315.1468837742; gat=1; ym_isad=2; ym_uid=1468837743323372246; _ym_visorc_37606275=w
I'm facing an issue where, in Safari, instead of getting
"title":"Номер карты получения"
as in Chrome or Firefox, I am seeing something like "title":"A1468837743323372246t%3A1468837754%3A
. Furthermore, in Safari, it appears to cut off the last closed braces compared to the debug results in other browsers.