From 1f7d4089f9125cec9fa0c0ada55a3d50a8cdfd0d Mon Sep 17 00:00:00 2001 From: Joel Chippindale Date: Mon, 17 Aug 2020 19:52:45 +0100 Subject: Fix handling of multiple spaces in URLSearchParams (#7068) This ensures that all spaces are set to be "+" in the string rather than just the first and brings deno into line with how browsers handle spaces in URLSearchParams, see #7001. --- cli/rt/11_url.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli/rt/11_url.js') diff --git a/cli/rt/11_url.js b/cli/rt/11_url.js index cb42e22c7..a7200f11c 100644 --- a/cli/rt/11_url.js +++ b/cli/rt/11_url.js @@ -883,7 +883,7 @@ function encodeSearchParam(s) { return [...s].map((c) => (charInFormUrlencodedSet(c) ? encodeChar(c) : c)) - .join("").replace("%20", "+"); + .join("").replace(/%20/g, "+"); } window.__bootstrap.url = { -- cgit v1.2.3