RESOLVED FIXED254617
innerHTML serialization should not have a special handling for javascript: URLs
https://bugs.webkit.org/show_bug.cgi?id=254617
Summary innerHTML serialization should not have a special handling for javascript: URLs
Ahmad Saleem
Reported 2023-03-28 13:54:12 PDT
Created attachment 465640 [details] Partial Patch for Merge - Local Testing (Build) .cpp side Hi Team, While going through Chromium's Monorail, I came across another failing test case: What steps will reproduce the problem? (1) Open the following URL data:text/html;charset=utf-8,<body> <div id=target><a href="javascript:&quot;foobar&quot;">link</a></div> <pre></pre> <script> alert(document.querySelector('div').innerHTML); </script> </body> What is the expected result? It should show an alert dialog with: <a href="javascript:&quot;foobar&quot;">link</a> What happens instead? It shows an alert dialog with: <a href='javascript:"foobar"'>link</a> Chrome Bug - https://bugs.chromium.org/p/chromium/issues/detail?id=927164 Blink Commit - https://chromium.googlesource.com/chromium/src.git/+/a806a0593906b75b9396d3bbd092bdda9161bf4c WPT Tests Progression - Two subtests of http://wpt.live/html/syntax/serializing-html-fragments/serializing.html Just wanted to raise so we can fix and get more WPT wins and browser compat wins. Thanks!
Attachments
Partial Patch for Merge - Local Testing (Build) .cpp side (1.32 MB, image/png)
2023-03-28 13:54 PDT, Ahmad Saleem
no flags
Partial Merge (.cpp) - MarkupAccumulator.cpp (1.38 MB, image/png)
2023-03-28 13:56 PDT, Ahmad Saleem
no flags
Ahmad Saleem
Comment 1 2023-03-28 13:56:34 PDT
Created attachment 465641 [details] Partial Merge (.cpp) - MarkupAccumulator.cpp Actual Patch.
EWS
Comment 2 2023-03-29 04:35:09 PDT
Committed 262267@main (948db072bd94): <https://commits.webkit.org/262267@main> Reviewed commits have been landed. Closing PR #12075 and removing active labels.
Radar WebKit Bug Importer
Comment 3 2023-03-29 04:36:17 PDT
Note You need to log in before you can comment on or make changes to this bug.