I am using this short code snippet:
var d = itemID + "," + quantity; var CookieData = $.cookie("storebasket"); if(CookieData == null || CookieData == "") { $.cookie("storebasket", d, { path: '/', expires: 60 }); } else { $.cookie("storebasket", CookieData + "|" + d, { path: '/', expires: 60 }); }
However, the ALLWAYS value becomes HTML encoded. For instance:
5%2C1
What when decoding with this tool :
5,1
I tried using unescape
but no luck:
$.cookie("storebasket", unescape(d), { path: '/', expires: 60 });
Any ideas?
source share