2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-17 19:21:29 +03:00

fix: improve regex in AxiosURLSearchParams (#10736)

This commit is contained in:
Jay
2026-04-16 21:14:22 +02:00
committed by GitHub
parent d87df3f7a1
commit 5266af9454
+1 -2
View File
@@ -18,9 +18,8 @@ function encode(str) {
')': '%29',
'~': '%7E',
'%20': '+',
'%00': '\x00',
};
return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {
return charMap[match];
});
}