URI.js icon indicating copy to clipboard operation
URI.js copied to clipboard

setSearch() breaks previous url parameters

Open Itazulay opened this issue 5 years ago • 0 comments

var myUri = new URI("https://google.com/a?b=c&d=e,f,g")
myUri.toString() // "https://google.com/a?b=c&d=e,f,g"
myUri.setSearch("new", "value")
myUri.toString() // "https://google.com/a?b=c&d=e%2Cf%2Cg&new=value"

Apparently during the buildQueryParameter functionality, we encode each parameter value thus causing ',' value to be encoded and not its original value

Itazulay avatar Mar 29 '20 10:03 Itazulay