Skip to content

Commit

Permalink
Fixed JS syntax errors on cookiePath
Browse files Browse the repository at this point in the history
Currrently, if the cookiePath is null as per the configuration, we get a SyntaxError ("Unexpected token }" or "expected expression, got '}'" depending on the browser) and if it is defined (to '/' for example as in the doc) we have another SyntaxError ("invalid escape sequence" or "Invalid or unexpected token" depending on the browser). Simply escaping the value solves both cases for me.
  • Loading branch information
amauryvallier committed May 28, 2018
1 parent cf326a7 commit e20dfbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Resources/views/privacycookie.html.twig
Expand Up @@ -21,7 +21,7 @@
var privacyCookieBanner = new eZ.PrivacyCookieBanner({
cookieName: '{{ cookieName }}',
days: {{ cookieValidity }},
path: {{ cookiePath }}
path: '{{ cookiePath }}'
});
setTimeout(function () {
privacyCookieBanner.show()
Expand Down

0 comments on commit e20dfbe

Please sign in to comment.