| Summary: | When assigning to the src value for a constructed Image(), Safari 14.1 mangles the string | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Jarod Gowgiel <jarod.gowgiel> | ||||
| Component: | JavaScriptCore | Assignee: | Alex Christensen <achristensen> | ||||
| Status: | RESOLVED WONTFIX | ||||||
| Severity: | Normal | CC: | achristensen, benjamin, cdumez, clopez, cmarcelo, ews-watchlist, sabouhallawa, webkit-bug-importer, youennf | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | Safari 14 | ||||||
| Hardware: | Mac (Intel) | ||||||
| OS: | macOS 11 | ||||||
| Attachments: |
|
||||||
|
Description
Jarod Gowgiel
2021-05-03 17:57:26 PDT
This changed with https://trac.webkit.org/changeset/266399/webkit which adopts the behavior of the URL specification at https://url.spec.whatwg.org/#fragment-state The percent encoding starts after the '#' character, which begins the fragment of the URL. Your example also percent encodes those spaces in Firefox. I've noticed some odd things about fragment encoding in different browsers: Browser | new URL("data://example.com/# <>") | new URL("data://example.com/# <>") ------------------------------------------------------------------------------------- Firefox 88 | data://example.com/#%20<> | http://example.com/#%20%3C%3E Chrome 90 | data://example.com/# <> | http://example.com/#%20%3C%3E Safari 14.1 | data://example.com/#%20%3C%3E | http://example.com/#%20%3C%3E I've raised https://github.com/whatwg/url/issues/597 and intend to implement my proposed change to increase compatibility, which would revert https://trac.webkit.org/changeset/266399/webkit for non-special schemes. Created attachment 427711 [details]
Patch
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess Comment on attachment 427711 [details]
Patch
Since we follow the specification which seems to not want to change, and because Firefox behaves the same way in this case, I'm going to say we won't fix this for now.
|