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:
@@ -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];
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user