Fix: Whitespace & URL encoding applied to query parameters.
fix: String.trim() applied to query parameter keys and values to remove additional whitespace. fix: encodeURI() applied to query string before being applied to request url path.
This commit is contained in:
@@ -768,9 +768,9 @@ export default {
|
||||
}
|
||||
let path = this.path
|
||||
let queryString = getQueryParams(newValue)
|
||||
.map(({ key, value }) => `${key}=${value}`)
|
||||
.map(({ key, value }) => `${key.trim()}=${value.trim()}`)
|
||||
.join("&")
|
||||
queryString = queryString === "" ? "" : `?${queryString}`
|
||||
queryString = queryString === "" ? "" : `?${encodeURI(queryString)}`
|
||||
if (path.includes("?")) {
|
||||
path = path.slice(0, path.indexOf("?")) + queryString
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user