diff --git a/app/assets/javascripts/cookie.js b/app/assets/javascripts/cookie.js index 1d5ffea0e..39c3a6b31 100644 --- a/app/assets/javascripts/cookie.js +++ b/app/assets/javascripts/cookie.js @@ -53,7 +53,7 @@ if (loc.match(/^\/(comment|pool|note|post)/) && this.get("tos") != "1") { // Setting location.pathname in Safari doesn't work, so manually extract the domain. var domain = location.href.match(/^(https?:\/\/[^\/]+)/)[0]; - location.href = domain + "/static/terms_of_service?url=" + location.href; + location.href = domain + "/terms_of_service?url=" + encodeURIComponent(location.href); return; }