RESOLVED WONTFIX 191836
Content pasted from Excel does not preserve its structure
https://bugs.webkit.org/show_bug.cgi?id=191836
Summary Content pasted from Excel does not preserve its structure
Comandeer
Reported 2018-11-19 06:41:03 PST
Created attachment 355278 [details] Excel file used for tests Content from Excel pasted into [contenteditable] area has all metadata stripped off, making it impossible to detect the source of the content. In Safari only the table element is available in DataTransfer object: https://gist.github.com/Comandeer/e0226ec9908a6a1fdf9b0204eacfa84f In case of Firefox and Chrome, the whole structure of HTML is preserved: https://gist.github.com/Comandeer/8909ffa0c93caadc88220f91ab72ad88 As it can be seen, Chrome and Firefox gives access to the whole HTML document, allowing to fetch metadata from its head section. Safari however gives access only to body section, which disables the ability to fetch useful metadata (e.g. about the generator of content or the author) and additional styles.
Attachments
Excel file used for tests (8.40 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2018-11-19 06:41 PST, Comandeer
no flags
Radar WebKit Bug Importer
Comment 1 2018-11-19 17:43:20 PST
Ryosuke Niwa
Comment 2 2019-08-10 01:05:19 PDT
This is intentional sanitization. It's not safe in terms of security & privacy to expose raw clipboard content put forth by cross origin websites or native applications: https://webkit.org/blog/8170/clipboard-api-improvements/
Note You need to log in before you can comment on or make changes to this bug.