[webkit-changes] [WebKit/WebKit] 9fa5ea: FragmentDirectiveGenerator: Selections with non-AS...
Tim Horton
noreply at github.com
Fri Aug 16 18:22:28 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9fa5eaa243c3e8322213ff58bc10a2c47285a217
https://github.com/WebKit/WebKit/commit/9fa5eaa243c3e8322213ff58bc10a2c47285a217
Author: Tim Horton <thorton at apple.com>
Date: 2024-08-16 (Fri, 16 Aug 2024)
Changed paths:
A LayoutTests/http/tests/scroll-to-text-fragment/generation-encodes-unicode-expected.txt
A LayoutTests/http/tests/scroll-to-text-fragment/generation-encodes-unicode.html
M Source/WTF/wtf/URLParser.cpp
Log Message:
-----------
FragmentDirectiveGenerator: Selections with non-ASCII characters and commas generate broken links
https://bugs.webkit.org/show_bug.cgi?id=278266
rdar://133883647
Reviewed by Abrar Rahman Protyasha.
Other browsers encode non-ASCII characters in text fragment directives.
Match them by doing the same.
Also, `percentEncodeCharacters` appears to fail to successfully propagate
non-ASCII characters that are *not* supposed to be encoded, if any character
*is* supposed to be encoded. Always encoding these characters handily works
around this issue.
* Source/WTF/wtf/URLParser.cpp:
(WTF::isSpecialCharacterForFragmentDirective):
* LayoutTests/http/tests/scroll-to-text-fragment/generation-encodes-unicode-expected.txt: Added.
* LayoutTests/http/tests/scroll-to-text-fragment/generation-encodes-unicode.html: Added.
Add a test!
Canonical link: https://commits.webkit.org/282378@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list