We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a6dfbb7 + cd466c5 commit 29f0121Copy full SHA for 29f0121
6-data-storage/01-cookie/cookie.js
@@ -1,6 +1,6 @@
1
function getCookie(name) {
2
let matches = document.cookie.match(new RegExp(
3
- "(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
+ "(?:^|; )" + name.replace(/([.$?*|{}()[\]\\/+^])/g, '\\$1') + "=([^;]*)"
4
));
5
return matches ? decodeURIComponent(matches[1]) : undefined;
6
}
0 commit comments