Steps to reproduce: 1. Open https://docs.google.com/document/d/1EdVmbZBsieJJryJfTuax2UI0zWAfTfo6dyXb1sfWChM/edit 2. Select all and copy. 3. Paste into https://jsfiddle.net/Comandeer/dnjsgk46/ The same content copied and pasted in Chrome and Firefox is correctly detected as content from Google Docs. However in Safari it's not. Safari seems to do some kind of normalization on copy and fixes incorrect HTML code provided by GDocs. Content in Chrome: https://gist.github.com/Comandeer/397d9611684d6c5d6dc632cc0ee37b33 Content in Safari: https://gist.github.com/Comandeer/a947fcb4ff4ad0ac2ae5a599cde65655 As shown on the above example, Safari deletes the b element, which wraps the whole div with the table, resulting in loss of metadata (b[id] attribute). Probably the bug is connected with https://bugs.webkit.org/show_bug.cgi?id=191836.
<rdar://problem/54155334>
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/