mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
fix: improve regex in AxiosURLSearchParams (#10736)
This commit is contained in:
@@ -18,9 +18,8 @@ function encode(str) {
|
|||||||
')': '%29',
|
')': '%29',
|
||||||
'~': '%7E',
|
'~': '%7E',
|
||||||
'%20': '+',
|
'%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];
|
return charMap[match];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user