Details
Description
Looks like the new URL Javascript object does not properly encode query string parameters:
let url = new URL('https://example.com/?a=b ~'); console.log(url.href, url.toString()); // "https://example.com/?a=b%20~" // output is instead: "https://example.com/?a=b ~" url = new URL('https://google.com/search'); url.searchParams.set('q', 'test me!'); // added parameter with a space and ! console.log(url.href, url.toString()); // param is not even added?!
Attachments
For Gerrit Dashboard: QTBUG-110454 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
458473,7 | UrlObject: Fix setting searchParams not modifying the url's search field | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
459075,5 | UrlObject: Properly encode the url search components | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
459414,2 | UrlObject: Fix setting searchParams not modifying the url's search field | 6.5 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
459415,2 | UrlObject: Properly encode the url search components | 6.5 | qt/qtdeclarative | Status: MERGED | +2 | 0 |