[Webkit-unassigned] [Bug 280749] New: serialization/deserialization during read/write operation of Clipboard APIs is different from other browsers
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Oct 2 02:28:11 PDT 2024
https://bugs.webkit.org/show_bug.cgi?id=280749
Bug ID: 280749
Summary: serialization/deserialization during read/write
operation of Clipboard APIs is different from other
browsers
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
URL: https://wpt.live/clipboard-apis/async-html-script-remo
val.https.html
OS: Unspecified
Status: NEW
Keywords: BrowserCompat, WPTImpact
Severity: Normal
Priority: P2
Component: HTML Editing
Assignee: webkit-unassigned at lists.webkit.org
Reporter: karlcow at apple.com
CC: rniwa at webkit.org, wenson_hsieh at apple.com
The test at https://wpt.live/clipboard-apis/async-html-script-removal.https.html
is supposed to check the script tag removal while doing a clipboard write and read operation
INPUT: "<title>Title of the document</title> <script>const a = 5;</script> <p>Hello World</p>"
EXPECTED: "<head> <title>Title of the document</title> </head> <body> <p>Hello World</p> </body>"
ACTUAL: "<head> </head> <body> <p style=\"caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); font-style: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;\">Hello World</p> </body>
The script element has been correctly removed but:
1. <title> has not been preserved
2. The <head> and <body> elements have not been added
3. the style attribute has been added with some values.
At this stage in the test, the content is already wrong.
const blobText = await (new Response(blobOutput)).text();
The issue is happening in between these
https://github.com/web-platform-tests/wpt/blob/b40c843d18efb71ab2f1343ce53e82d06cdf7702/clipboard-apis/async-html-script-removal.https.html#L39-L53
Something is not normalizing the same way, but which steps of the process.
1. new Blob([html_with_script], {type: 'text/html'}) ?
2. new ClipboardItem({'text/html': blobInput}) ?
3. navigator.clipboard.write([clipboardItem]) ?
4. await navigator.clipboard.read() ?
5. await (new Response(blobOutput)).text() ?
--
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/20241002/c6c60d0a/attachment.htm>
More information about the webkit-unassigned
mailing list