[Webkit-unassigned] [Bug 227259] New: Treat javascript: URL return values as UTF-8 bytes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 22 10:27:52 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=227259

            Bug ID: 227259
           Summary: Treat javascript: URL return values as UTF-8 bytes
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: d at domenic.me

When navigating to javascript:'foo', the string 'foo' is used as the "response body" for the navigation.

Previously the spec was not clear what it meant for a string to become a response body (which is usually bytes). In https://github.com/whatwg/html/pull/6781 it was updated to be clear the response body is encoded into UTF-8 bytes, which are then later decoded back into a string by the HTML parser. In particular, this means that lone surrogates do not round-trip. Also, the encoding for the resulting document is forced to UTF-8.

See tests at https://wpt.fyi/results/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-return-value-handling-dynamic.html?label=master&label=experimental&product=chrome&product=firefox&product=safari&aligned

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210622/b22077b6/attachment.htm>


More information about the webkit-unassigned mailing list