{"action":"created","issue":{"url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/issues/379","labels_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/issues/379/labels{/name}","comments_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/issues/379/comments","events_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/issues/379/events","html_url":"https://github.com/wordpress-mobile/WordPressCom-Stats-iOS/pull/379","id":127962207,"number":379,"title":"Sanitize post titles for Insights (and other endpoints)","user":{"login":"astralbodies","id":373903,"avatar_url":"https://avatars.githubusercontent.com/u/373903?v=3","gravatar_id":"","url":"https://api.github.com/users/astralbodies","html_url":"https://github.com/astralbodies","followers_url":"https://api.github.com/users/astralbodies/followers","following_url":"https://api.github.com/users/astralbodies/following{/other_user}","gists_url":"https://api.github.com/users/astralbodies/gists{/gist_id}","starred_url":"https://api.github.com/users/astralbodies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astralbodies/subscriptions","organizations_url":"https://api.github.com/users/astralbodies/orgs","repos_url":"https://api.github.com/users/astralbodies/repos","events_url":"https://api.github.com/users/astralbodies/events{/privacy}","received_events_url":"https://api.github.com/users/astralbodies/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/labels/API","name":"API","color":"eb6420"}],"state":"open","locked":false,"assignee":{"login":"aerych","id":1435271,"avatar_url":"https://avatars.githubusercontent.com/u/1435271?v=3","gravatar_id":"","url":"https://api.github.com/users/aerych","html_url":"https://github.com/aerych","followers_url":"https://api.github.com/users/aerych/followers","following_url":"https://api.github.com/users/aerych/following{/other_user}","gists_url":"https://api.github.com/users/aerych/gists{/gist_id}","starred_url":"https://api.github.com/users/aerych/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aerych/subscriptions","organizations_url":"https://api.github.com/users/aerych/orgs","repos_url":"https://api.github.com/users/aerych/repos","events_url":"https://api.github.com/users/aerych/events{/privacy}","received_events_url":"https://api.github.com/users/aerych/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/milestones/14","html_url":"https://github.com/wordpress-mobile/WordPressCom-Stats-iOS/milestones/Release%209","labels_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/milestones/14/labels","id":1419981,"number":14,"title":"Release 9","description":"","creator":{"login":"astralbodies","id":373903,"avatar_url":"https://avatars.githubusercontent.com/u/373903?v=3","gravatar_id":"","url":"https://api.github.com/users/astralbodies","html_url":"https://github.com/astralbodies","followers_url":"https://api.github.com/users/astralbodies/followers","following_url":"https://api.github.com/users/astralbodies/following{/other_user}","gists_url":"https://api.github.com/users/astralbodies/gists{/gist_id}","starred_url":"https://api.github.com/users/astralbodies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astralbodies/subscriptions","organizations_url":"https://api.github.com/users/astralbodies/orgs","repos_url":"https://api.github.com/users/astralbodies/repos","events_url":"https://api.github.com/users/astralbodies/events{/privacy}","received_events_url":"https://api.github.com/users/astralbodies/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":7,"state":"open","created_at":"2015-11-19T15:08:29Z","updated_at":"2016-01-21T16:23:49Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2016-01-21T16:23:43Z","updated_at":"2016-01-22T12:35:01Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/pulls/379","html_url":"https://github.com/wordpress-mobile/WordPressCom-Stats-iOS/pull/379","diff_url":"https://github.com/wordpress-mobile/WordPressCom-Stats-iOS/pull/379.diff","patch_url":"https://github.com/wordpress-mobile/WordPressCom-Stats-iOS/pull/379.patch"},"body":"Fixes: #377 \r\n\r\nSanitizes the post titles coming back from the API when used in stats. This follows roughly the same method used in WPiOS. Added a unit test to ensure the fix was proper.\r\n\r\nSample return data from the API:\r\n```\r\n{\r\n  \"found\": 16,\r\n  \"posts\": [\r\n    {\r\n      \"ID\": 58,\r\n      \"date\": \"2016-01-21T14:46:42+00:00\",\r\n      \"title\": \"This &#8220;has&#8221; special &amp; characters\",\r\n      \"URL\": \"https://ardwptest1.wordpress.com/2016/01/21/this-has-special-characters/\"\r\n    }\r\n  ]\r\n}\r\n```\r\nAnd the fixed output:\r\n![simulator screen shot jan 21 2016 10 20 49 am](https://cloud.githubusercontent.com/assets/373903/12486523/b6f6c634-c028-11e5-8b64-09a69a2d21b8.png)\r\n\r\nNeeds Review: @aerych "},"comment":{"url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/issues/comments/173909201","html_url":"https://github.com/wordpress-mobile/WordPressCom-Stats-iOS/pull/379#issuecomment-173909201","issue_url":"https://api.github.com/repos/wordpress-mobile/WordPressCom-Stats-iOS/issues/379","id":173909201,"user":{"login":"astralbodies","id":373903,"avatar_url":"https://avatars.githubusercontent.com/u/373903?v=3","gravatar_id":"","url":"https://api.github.com/users/astralbodies","html_url":"https://github.com/astralbodies","followers_url":"https://api.github.com/users/astralbodies/followers","following_url":"https://api.github.com/users/astralbodies/following{/other_user}","gists_url":"https://api.github.com/users/astralbodies/gists{/gist_id}","starred_url":"https://api.github.com/users/astralbodies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astralbodies/subscriptions","organizations_url":"https://api.github.com/users/astralbodies/orgs","repos_url":"https://api.github.com/users/astralbodies/repos","events_url":"https://api.github.com/users/astralbodies/events{/privacy}","received_events_url":"https://api.github.com/users/astralbodies/received_events","type":"User","site_admin":false},"created_at":"2016-01-22T12:35:01Z","updated_at":"2016-01-22T12:35:01Z","body":"Really appreciate the review, @aerych!"}}