We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f06749c commit 0790074Copy full SHA for 0790074
src/api.mjs
@@ -21,8 +21,6 @@ function init (converter, defaultAttributes) {
21
.replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)
22
.replace(/[()]/g, escape)
23
24
- value = converter.write(value, key)
25
-
26
var stringifiedAttributes = ''
27
for (var attributeName in attributes) {
28
if (!attributes[attributeName]) {
@@ -45,7 +43,8 @@ function init (converter, defaultAttributes) {
45
43
stringifiedAttributes += '=' + attributes[attributeName].split(';')[0]
46
44
}
47
48
- return (document.cookie = key + '=' + value + stringifiedAttributes)
+ return (document.cookie =
+ key + '=' + converter.write(value, key) + stringifiedAttributes)
49
50
51
function get (key) {
0 commit comments