| Summary: | URL path setter messes up UTF-8 encoding after ? | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Timothy Gu <timothygu99> | ||||
| Component: | New Bugs | Assignee: | Alex Christensen <achristensen> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | achristensen, benjamin, cdumez, cmarcelo, ews-watchlist, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
Created attachment 429539 [details]
Patch
Thanks for pointing this out, Timothy! Comment on attachment 429539 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=429539&action=review r=me > Source/WTF/ChangeLog:10 > + This matches Chrome, Firefox, and reason. :) Committed r278091 (238166@main): <https://commits.webkit.org/238166@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 429539 [details]. |
With the following code: u = new URL('http://abc/'); u.pathname = "/?é"; console.log(u.pathname); The string "/%3F%C3%83%C2%A9" is printed. But this is wrong, since é in UTF-8 is 0xC3 0xA9. If we remove the ?, everything works fine: u = new URL('http://abc/'); u.pathname = "/é"; console.log(u.pathname); // prints "/%C3%A9"