[webkit-changes] [WebKit/WebKit] 8a954b: Handle lone surrogates correctly for non-UTF-8 enc...

Anne van Kesteren noreply at github.com
Mon Apr 3 10:25:30 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8a954b16d853431cc8dfd069e2994cf4904ca3e3
      https://github.com/WebKit/WebKit/commit/8a954b16d853431cc8dfd069e2994cf4904ca3e3
  Author: Anne van Kesteren <annevk at annevk.nl>
  Date:   2023-04-03 (Mon, 03 Apr 2023)

  Changed paths:
    M LayoutTests/fast/url/query-expected.txt
    M LayoutTests/fast/url/query.html
    M LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/urls/resolving-urls/query-encoding/lone-surrogates.sub_encoding=windows-1252-expected.txt
    M Source/WebCore/PAL/pal/text/TextCodec.cpp

  Log Message:
  -----------
  Handle lone surrogates correctly for non-UTF-8 encodings
https://bugs.webkit.org/show_bug.cgi?id=254888
rdar://107530253

Reviewed by Alexey Proskuryakov.

Replace lone surrogates with the replacement code point. Unlike the standard our encoders operate on code points and turning those into scalar values ahead-of-time would be expensive. The next best thing is not surfacing the consequences thereof.

* LayoutTests/fast/url/query-expected.txt:
* LayoutTests/fast/url/query.html:
* LayoutTests/imported/w3c/web-platform-tests/html/infrastructure/urls/resolving-urls/query-encoding/lone-surrogates.sub_encoding=windows-1252-expected.txt:
* Source/WebCore/PAL/pal/text/TextCodec.cpp:
(PAL::TextCodec::getUnencodableReplacement):

Canonical link: https://commits.webkit.org/262513@main




More information about the webkit-changes mailing list