Skip to content

Commit fd4e161

Browse files
committed
add changeset, escape delimiters
1 parent 7287210 commit fd4e161

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/rich-cougars-explode.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@solid-primitives/storage": minor
3+
---
4+
5+
fixes utf8 escaping in cookieStorage

packages/storage/src/cookies.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export const cookieStorage: SyncStorageWithOptions<CookieOptions> =
142142
getItem: (key: string, options?: CookieOptions) =>
143143
deserializeCookieOptions(cookieStorage._read(options), key),
144144
setItem: (key: string, value: string, options?: CookieOptions) => {
145-
cookieStorage._write(key, value.replace(/[\u00c0-\uffff]/g, (c) =>
145+
cookieStorage._write(key, value.replace(/[\u00c0-\uffff\&;]/g, (c) =>
146146
encodeURIComponent(c)
147147
), options);
148148
},

0 commit comments

Comments
 (0)