I'm encountering an issue when trying to set a session cookie for storing an Address. It seems that whenever I include a comma followed by a space in the cookie's value, Safari automatically removes the spaces after the commas, causing the format to break.
// Here is the JavaScript code I used to save the cookie
document.cookie = "Address=Sample Address, Ontario, Canada;path=/;expire=0;";
// The result
document.cookie => "Address=Sample Address,Ontario,Canada"
Is there a way to resolve this behavior? Is there a method to instruct Safari not to eliminate the spaces?
Safari Version 10.1.2 (12603.3.8) | MacOS Sierra Version 10.12.6