1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-04 00:18:01 +01:00

Fix encoding issue in username cookie #39

This commit is contained in:
Ivar 2017-01-04 22:52:23 +01:00
parent 5da2ed17fc
commit 3a15da5913

View File

@ -19,7 +19,7 @@ function readCookie () {
}
function writeCookie (userName) {
document.cookie = `${COOKIE_NAME}=${userName}; expires=Thu, 18 Dec 2099 12:00:00 UTC`;
document.cookie = `${COOKIE_NAME}=${encodeURIComponent(userName)}; expires=Thu, 18 Dec 2099 12:00:00 UTC`;
}