{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/woocommerce-services/issues/985","repository_url":"https://api.github.com/repos/Automattic/woocommerce-services","labels_url":"https://api.github.com/repos/Automattic/woocommerce-services/issues/985/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/woocommerce-services/issues/985/comments","events_url":"https://api.github.com/repos/Automattic/woocommerce-services/issues/985/events","html_url":"https://github.com/Automattic/woocommerce-services/pull/985","id":221833112,"number":985,"title":"Fix quotation marks serialization","user":{"login":"marcinbot","id":800604,"avatar_url":"https://avatars2.githubusercontent.com/u/800604?v=3","gravatar_id":"","url":"https://api.github.com/users/marcinbot","html_url":"https://github.com/marcinbot","followers_url":"https://api.github.com/users/marcinbot/followers","following_url":"https://api.github.com/users/marcinbot/following{/other_user}","gists_url":"https://api.github.com/users/marcinbot/gists{/gist_id}","starred_url":"https://api.github.com/users/marcinbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcinbot/subscriptions","organizations_url":"https://api.github.com/users/marcinbot/orgs","repos_url":"https://api.github.com/users/marcinbot/repos","events_url":"https://api.github.com/users/marcinbot/events{/privacy}","received_events_url":"https://api.github.com/users/marcinbot/received_events","type":"User","site_admin":false},"labels":[{"id":322224206,"url":"https://api.github.com/repos/Automattic/woocommerce-services/labels/[Status]%20In%20Progress","name":"[Status] In Progress","color":"207de5","default":false},{"id":322224210,"url":"https://api.github.com/repos/Automattic/woocommerce-services/labels/[Status]%20Needs%20Author%20Reply","name":"[Status] Needs Author Reply","color":"eb6420","default":false}],"state":"open","locked":false,"assignee":{"login":"marcinbot","id":800604,"avatar_url":"https://avatars2.githubusercontent.com/u/800604?v=3","gravatar_id":"","url":"https://api.github.com/users/marcinbot","html_url":"https://github.com/marcinbot","followers_url":"https://api.github.com/users/marcinbot/followers","following_url":"https://api.github.com/users/marcinbot/following{/other_user}","gists_url":"https://api.github.com/users/marcinbot/gists{/gist_id}","starred_url":"https://api.github.com/users/marcinbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcinbot/subscriptions","organizations_url":"https://api.github.com/users/marcinbot/orgs","repos_url":"https://api.github.com/users/marcinbot/repos","events_url":"https://api.github.com/users/marcinbot/events{/privacy}","received_events_url":"https://api.github.com/users/marcinbot/received_events","type":"User","site_admin":false},"assignees":[{"login":"marcinbot","id":800604,"avatar_url":"https://avatars2.githubusercontent.com/u/800604?v=3","gravatar_id":"","url":"https://api.github.com/users/marcinbot","html_url":"https://github.com/marcinbot","followers_url":"https://api.github.com/users/marcinbot/followers","following_url":"https://api.github.com/users/marcinbot/following{/other_user}","gists_url":"https://api.github.com/users/marcinbot/gists{/gist_id}","starred_url":"https://api.github.com/users/marcinbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcinbot/subscriptions","organizations_url":"https://api.github.com/users/marcinbot/orgs","repos_url":"https://api.github.com/users/marcinbot/repos","events_url":"https://api.github.com/users/marcinbot/events{/privacy}","received_events_url":"https://api.github.com/users/marcinbot/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2017-04-14T15:39:00Z","updated_at":"2017-04-24T16:07:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Automattic/woocommerce-services/pulls/985","html_url":"https://github.com/Automattic/woocommerce-services/pull/985","diff_url":"https://github.com/Automattic/woocommerce-services/pull/985.diff","patch_url":"https://github.com/Automattic/woocommerce-services/pull/985.patch"},"body":"Fixes #984\r\n\r\nThis PR replaces usages of vanilla `json_encode` with a custom function that does the following:\r\n* uses `wp_json_encode` to ensure that the quotation marks are escaped\r\n* escapes them again, since unescaped backslashes are stripped before writing to the database\r\n\r\nIt also adds regexes to try and handle the faulty JSONs that were created before this fix.\r\n\r\nTo test:\r\n* place an order using the following:\r\n  * predefined package with quotes in its name \r\n  * custom package with quotes in its name\r\n  * package without quotes in its name\r\n  * product with the quotes in its name\r\n  * product without the quotes in its name\r\n* open the order or orders as a merchant\r\n* purchase labels\r\n* refresh the page and verify that the labels are still listed in the metabox"},"comment":{"url":"https://api.github.com/repos/Automattic/woocommerce-services/issues/comments/296722107","html_url":"https://github.com/Automattic/woocommerce-services/pull/985#issuecomment-296722107","issue_url":"https://api.github.com/repos/Automattic/woocommerce-services/issues/985","id":296722107,"user":{"login":"marcinbot","id":800604,"avatar_url":"https://avatars2.githubusercontent.com/u/800604?v=3","gravatar_id":"","url":"https://api.github.com/users/marcinbot","html_url":"https://github.com/marcinbot","followers_url":"https://api.github.com/users/marcinbot/followers","following_url":"https://api.github.com/users/marcinbot/following{/other_user}","gists_url":"https://api.github.com/users/marcinbot/gists{/gist_id}","starred_url":"https://api.github.com/users/marcinbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcinbot/subscriptions","organizations_url":"https://api.github.com/users/marcinbot/orgs","repos_url":"https://api.github.com/users/marcinbot/repos","events_url":"https://api.github.com/users/marcinbot/events{/privacy}","received_events_url":"https://api.github.com/users/marcinbot/received_events","type":"User","site_admin":false},"created_at":"2017-04-24T16:07:55Z","updated_at":"2017-04-24T16:07:55Z","body":"This should be ready for more review. I added tests for multiple items/packages, rebased, and fixed the unit tests to account for the changes in master (deleted product names)"}}
{"actor":{"display_login":"marcinbot"}}