From 5266af94540552e99079caa66bb241bf35b42051 Mon Sep 17 00:00:00 2001 From: Jay Date: Thu, 16 Apr 2026 21:14:22 +0200 Subject: [PATCH] fix: improve regex in AxiosURLSearchParams (#10736) --- lib/helpers/AxiosURLSearchParams.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/helpers/AxiosURLSearchParams.js b/lib/helpers/AxiosURLSearchParams.js index da63392e..57cf16d1 100644 --- a/lib/helpers/AxiosURLSearchParams.js +++ b/lib/helpers/AxiosURLSearchParams.js @@ -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]; }); }