WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
226136
URL path setter messes up UTF-8 encoding after ?
https://bugs.webkit.org/show_bug.cgi?id=226136
Summary
URL path setter messes up UTF-8 encoding after ?
Timothy Gu
Reported
2021-05-21 22:10:08 PDT
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"
Attachments
Patch
(5.56 KB, patch)
2021-05-24 09:30 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2021-05-24 09:30:05 PDT
Created
attachment 429539
[details]
Patch
Alex Christensen
Comment 2
2021-05-24 09:30:29 PDT
Thanks for pointing this out, Timothy!
Chris Dumez
Comment 3
2021-05-26 10:07:32 PDT
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.
:)
EWS
Comment 4
2021-05-26 10:34:10 PDT
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]
.
Radar WebKit Bug Importer
Comment 5
2021-05-26 10:35:18 PDT
<
rdar://problem/78520238
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug