This proposal provides an `unsanitized` option in read() method to get unsanitized HTML format.. Unless sites choose to adopt the new API, reading from the clipboard will be sanitized. Currently, when we read text/html MIME types using the async API, the sanitizer is invoked to strip out contents from the HTML markup due to security concerns, and styles are inlined in the HTML, which leads to a bloated HTML payload and loss of fidelity of HTML content when read by web authors or native apps. Currently, Firefox provides access to unsanitized HTML via DataTransfer APIs, which matches Chromium's behavior, and Safari only allows access to unsanitized HTML if it's being read within the same origin.
HTML content is essential for supporting copy/paste operation of high-fidelity content from native apps to web sites and vice versa, especially in sites supporting document editing. DataTransfer object's getData and async clipboard read() methods have interop differences in how the HTML content is sanitized during a paste operation. The getData method returns unsanitized HTML content, but the read() method uses the browser's sanitizer to strip out content (ex. global <style>s, <script>s, <meta> tags) from the HTML markup which results in format loss and bloating of payload due to inlining of styles. (https://github.com/w3c/editing/blob/gh-pages/docs/clipboard-unsanitized/explainer.md#example-of-content-getting-stripped-out-and-styles-getting-inlined)
Samples: https://github.com/w3c/editing/blob/gh-pages/docs/clipboard-unsanitized/unsanitized-html-demo.html
Explainers: https://github.com/w3c/editing/blob/gh-pages/docs/clipboard-unsanitized/explainer.md