{"action":"created","issue":{"url":"https://api.github.com/repos/WordPress/gutenberg/issues/1130","repository_url":"https://api.github.com/repos/WordPress/gutenberg","labels_url":"https://api.github.com/repos/WordPress/gutenberg/issues/1130/labels{/name}","comments_url":"https://api.github.com/repos/WordPress/gutenberg/issues/1130/comments","events_url":"https://api.github.com/repos/WordPress/gutenberg/issues/1130/events","html_url":"https://github.com/WordPress/gutenberg/pull/1130","id":235061132,"number":1130,"title":"Parser: Accept JSON-encoded attributes","user":{"login":"dmsnell","id":5431237,"avatar_url":"https://avatars0.githubusercontent.com/u/5431237?v=3","gravatar_id":"","url":"https://api.github.com/users/dmsnell","html_url":"https://github.com/dmsnell","followers_url":"https://api.github.com/users/dmsnell/followers","following_url":"https://api.github.com/users/dmsnell/following{/other_user}","gists_url":"https://api.github.com/users/dmsnell/gists{/gist_id}","starred_url":"https://api.github.com/users/dmsnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmsnell/subscriptions","organizations_url":"https://api.github.com/users/dmsnell/orgs","repos_url":"https://api.github.com/users/dmsnell/repos","events_url":"https://api.github.com/users/dmsnell/events{/privacy}","received_events_url":"https://api.github.com/users/dmsnell/received_events","type":"User","site_admin":false},"labels":[{"id":596962405,"url":"https://api.github.com/repos/WordPress/gutenberg/labels/[Component]%20Parsing","name":"[Component] Parsing","color":"fbca04","default":false},{"id":531680823,"url":"https://api.github.com/repos/WordPress/gutenberg/labels/[Type]%20Bug","name":"[Type] Bug","color":"d93f0b","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-06-11T12:03:01Z","updated_at":"2017-06-12T08:11:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/WordPress/gutenberg/pulls/1130","html_url":"https://github.com/WordPress/gutenberg/pull/1130","diff_url":"https://github.com/WordPress/gutenberg/pull/1130.diff","patch_url":"https://github.com/WordPress/gutenberg/pull/1130.patch"},"body":"Fixes #1086 \r\n\r\nPreviously the parser would fail handling attributes with escaped quotes\r\nin them. For example, 'data=\"a\\\"a\"' would fail because the parser\r\nattempted to grab only `a\\` instead of `a\\\"a`.\r\n\r\nThis has been fixed by indicating that a valid value is _either_ an\r\nescaped quote _or_ any character other than a quote.\r\n\r\n@westonruter I put this together before I saw #1088. Are we sure we want to include a full JSON parser in this as well? That may be fine, but I think it's also valid to grab the string and let JavaScript do the JSON parsing (this is how I set it up in [wp-post-grammar](https://github.com/Automattic/wp-post-grammar/blob/dac539b126df6012de6a8a7c3b70b9ad8988f514/src/post.pegjs#L1)) Doing it in JS would be faster but obviously make it less viable for harmony without effort on the PHP side."},"comment":{"url":"https://api.github.com/repos/WordPress/gutenberg/issues/comments/307719536","html_url":"https://github.com/WordPress/gutenberg/pull/1130#issuecomment-307719536","issue_url":"https://api.github.com/repos/WordPress/gutenberg/issues/1130","id":307719536,"user":{"login":"youknowriad","id":272444,"avatar_url":"https://avatars0.githubusercontent.com/u/272444?v=3","gravatar_id":"","url":"https://api.github.com/users/youknowriad","html_url":"https://github.com/youknowriad","followers_url":"https://api.github.com/users/youknowriad/followers","following_url":"https://api.github.com/users/youknowriad/following{/other_user}","gists_url":"https://api.github.com/users/youknowriad/gists{/gist_id}","starred_url":"https://api.github.com/users/youknowriad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/youknowriad/subscriptions","organizations_url":"https://api.github.com/users/youknowriad/orgs","repos_url":"https://api.github.com/users/youknowriad/repos","events_url":"https://api.github.com/users/youknowriad/events{/privacy}","received_events_url":"https://api.github.com/users/youknowriad/received_events","type":"User","site_admin":false},"created_at":"2017-06-12T08:11:11Z","updated_at":"2017-06-12T08:11:11Z","body":"Also, I guess we should also update the serializer to escape quotes in attributes."}}
{"actor":{"display_login":"youknowriad"}}