{"action":"created","issue":{"url":"https://api.github.com/repos/WordPress/gutenberg/issues/5966","repository_url":"https://api.github.com/repos/WordPress/gutenberg","labels_url":"https://api.github.com/repos/WordPress/gutenberg/issues/5966/labels{/name}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/issues/5966/comments","events_url":"https://api.github.com/repos/WordPress/gutenberg/issues/5966/events","html_url":"https://github.com/WordPress/gutenberg/pull/5966","id":311026397,"number":5966,"title":"Add paste schema (fix various issues, simplify)","user":{"login":"iseulde","id":4710635,"avatar_url":"https://avatars3.githubusercontent.com/u/4710635?v=4","gravatar_id":"","url":"https://api.github.com/users/iseulde","html_url":"https://github.com/iseulde","followers_url":"https://api.github.com/users/iseulde/followers","following_url":"https://api.github.com/users/iseulde/following{/other_user}","gists_url":"https://api.github.com/users/iseulde/gists{/gist_id}","starred_url":"https://api.github.com/users/iseulde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iseulde/subscriptions","organizations_url":"https://api.github.com/users/iseulde/orgs","repos_url":"https://api.github.com/users/iseulde/repos","events_url":"https://api.github.com/users/iseulde/events{/privacy}","received_events_url":"https://api.github.com/users/iseulde/received_events","type":"User","site_admin":false},"labels":[{"id":671400480,"url":"https://api.github.com/repos/WordPress/gutenberg/labels/[Component]%20Copy/Paste","name":"[Component] Copy/Paste","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-03T22:56:05Z","updated_at":"2018-04-11T15:58:23Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/WordPress/gutenberg/pulls/5966","html_url":"https://github.com/WordPress/gutenberg/pull/5966","diff_url":"https://github.com/WordPress/gutenberg/pull/5966.diff","patch_url":"https://github.com/WordPress/gutenberg/pull/5966.patch"},"body":"## Description\r\n\r\nThis branch simplifies whitelisting and reduces the amount of filters. The idea is that there is one schema with all possible paths that a pasted node tree can have. If something is different from what is possible, the node should unwrap or be deleted.\r\n\r\n* Fixes case where a loose `figcaption` is kept and put in a classic block. The expected result is the `figcaption` element to unwrap. Try pasting from https://www.nytimes.com/2018/03/28/magazine/poem-the-nod.html.\r\n* Fixes invalid lists where OL/UL > OL/UL.\r\n* Handles cases where STRONG > STRONG etc.\r\n* No need to have a custom filter to strip text nodes from tables. All text nodes are now stripped where they don't belong.\r\n* Also no need to specifically strip comments.\r\n* Avoid extra loop through all nodes for MS lists.\r\n* Avoid expensive invalid inline content filter.\r\n* Attributes are stripped as part of the schema too.\r\n\r\n## How Has This Been Tested?\r\nPaste tests should pass.\r\n\r\n## Checklist:\r\n- [x] My code is tested.\r\n- [x] My code follows the WordPress code style.\r\n- [x] My code has proper inline documentation."},"comment":{"url":"https://api.github.com/repos/WordPress/gutenberg/issues/comments/380504720","html_url":"https://github.com/WordPress/gutenberg/pull/5966#issuecomment-380504720","issue_url":"https://api.github.com/repos/WordPress/gutenberg/issues/5966","id":380504720,"user":{"login":"iseulde","id":4710635,"avatar_url":"https://avatars3.githubusercontent.com/u/4710635?v=4","gravatar_id":"","url":"https://api.github.com/users/iseulde","html_url":"https://github.com/iseulde","followers_url":"https://api.github.com/users/iseulde/followers","following_url":"https://api.github.com/users/iseulde/following{/other_user}","gists_url":"https://api.github.com/users/iseulde/gists{/gist_id}","starred_url":"https://api.github.com/users/iseulde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iseulde/subscriptions","organizations_url":"https://api.github.com/users/iseulde/orgs","repos_url":"https://api.github.com/users/iseulde/repos","events_url":"https://api.github.com/users/iseulde/events{/privacy}","received_events_url":"https://api.github.com/users/iseulde/received_events","type":"User","site_admin":false},"created_at":"2018-04-11T15:58:23Z","updated_at":"2018-04-11T15:58:23Z","author_association":"MEMBER","body":"Rebased."}}
{"actor":{"display_login":"iseulde"}}