{"action":"created","comment":{"url":"https://api.github.com/repos/Financial-Times/n-content-transform/pulls/comments/73663581","id":73663581,"diff_hunk":"@@ -76,29 +76,34 @@ const breakpoints = [\n const exists = item => item;\n \n const responsifyImage = ($img, src, sizesConfig, widths) => {\n-\tconst entities = new Entities();\n-\tconst srcset = widths\n-\t\t.filter(exists)\n-\t\t.map(width =>\n-\t\t\t`https://next-geebee.ft.com/image/v1/images/raw/${encodeURIComponent(entities.decode(src))}?source=next&fit=scale-down&width=${width} ${width}w`\n-\t\t)\n-\t\t.join(', ');\n-\tconst sizes = breakpoints\n-\t\t.map(breakpoint => {\n-\t\t\tconst size = sizesConfig[breakpoint.name];\n-\t\t\treturn size ?\n-\t\t\t\tbreakpoint.name === 'default' ? size : `(min-width: ${breakpoint.em}em) ${size}` :\n-\t\t\t\tnull;\n-\t\t})\n-\t\t.filter(size => size)\n-\t\t.join(', ');\n-\n-\treturn $img\n-\t\t.attr('srcset', srcset)\n-\t\t// Matching o-grid at L breakpoint (8 cols) and default (12 cols)\n-\t\t// http://w3c.github.io/html/semantics-embedded-content.html#viewport-based-selection\n-\t\t.attr('sizes', sizes)\n-\t\t.removeAttr('src');\n+\n+\tif(!src) {\n+\t\treturn;","path":"server/figure-variant.js","position":29,"original_position":29,"commit_id":"9f01d3c988e1e05fb802ae52d8841b33653e08c1","original_commit_id":"9f01d3c988e1e05fb802ae52d8841b33653e08c1","user":{"login":"debugwand","id":996106,"avatar_url":"https://avatars.githubusercontent.com/u/996106?v=3","gravatar_id":"","url":"https://api.github.com/users/debugwand","html_url":"https://github.com/debugwand","followers_url":"https://api.github.com/users/debugwand/followers","following_url":"https://api.github.com/users/debugwand/following{/other_user}","gists_url":"https://api.github.com/users/debugwand/gists{/gist_id}","starred_url":"https://api.github.com/users/debugwand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/debugwand/subscriptions","organizations_url":"https://api.github.com/users/debugwand/orgs","repos_url":"https://api.github.com/users/debugwand/repos","events_url":"https://api.github.com/users/debugwand/events{/privacy}","received_events_url":"https://api.github.com/users/debugwand/received_events","type":"User","site_admin":false},"body":"also throw an error / log to somewhere so we can catch bad data","created_at":"2016-08-05T09:13:34Z","updated_at":"2016-08-05T09:13:34Z","html_url":"https://github.com/Financial-Times/n-content-transform/pull/17#discussion_r73663581","pull_request_url":"https://api.github.com/repos/Financial-Times/n-content-transform/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/Financial-Times/n-content-transform/pulls/comments/73663581"},"html":{"href":"https://github.com/Financial-Times/n-content-transform/pull/17#discussion_r73663581"},"pull_request":{"href":"https://api.github.com/repos/Financial-Times/n-content-transform/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/Financial-Times/n-content-transform/pulls/17","id":80107471,"html_url":"https://github.com/Financial-Times/n-content-transform/pull/17","diff_url":"https://github.com/Financial-Times/n-content-transform/pull/17.diff","patch_url":"https://github.com/Financial-Times/n-content-transform/pull/17.patch","issue_url":"https://api.github.com/repos/Financial-Times/n-content-transform/issues/17","number":17,"state":"open","locked":false,"title":"Adds a safe guard against bad image data","user":{"login":"GlynnPhillips","id":524573,"avatar_url":"https://avatars.githubusercontent.com/u/524573?v=3","gravatar_id":"","url":"https://api.github.com/users/GlynnPhillips","html_url":"https://github.com/GlynnPhillips","followers_url":"https://api.github.com/users/GlynnPhillips/followers","following_url":"https://api.github.com/users/GlynnPhillips/following{/other_user}","gists_url":"https://api.github.com/users/GlynnPhillips/gists{/gist_id}","starred_url":"https://api.github.com/users/GlynnPhillips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GlynnPhillips/subscriptions","organizations_url":"https://api.github.com/users/GlynnPhillips/orgs","repos_url":"https://api.github.com/users/GlynnPhillips/repos","events_url":"https://api.github.com/users/GlynnPhillips/events{/privacy}","received_events_url":"https://api.github.com/users/GlynnPhillips/received_events","type":"User","site_admin":false},"body":"Makes sure an image entity has a src attribute, if an image doesn't have a src then currently things blow up.\r\n\r\nIdeally the data will be fixed but this just prevents the article from being unreadable whilst the data is fixed.\r\n","created_at":"2016-08-04T16:17:35Z","updated_at":"2016-08-05T09:13:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"083839539db8e1d2342bc33bddf8d04684c65f03","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Financial-Times/n-content-transform/pulls/17/commits","review_comments_url":"https://api.github.com/repos/Financial-Times/n-content-transform/pulls/17/comments","review_comment_url":"https://api.github.com/repos/Financial-Times/n-content-transform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Financial-Times/n-content-transform/issues/17/comments","statuses_url":"https://api.github.com/repos/Financial-Times/n-content-transform/statuses/9f01d3c988e1e05fb802ae52d8841b33653e08c1","head":{"label":"Financial-Times:img-safeguard","ref":"img-safeguard","sha":"9f01d3c988e1e05fb802ae52d8841b33653e08c1","user":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"repo":{"id":54404319,"name":"n-content-transform","full_name":"Financial-Times/n-content-transform","owner":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Financial-Times/n-content-transform","description":"Further (opinionated) transformation of content html for Next","fork":false,"url":"https://api.github.com/repos/Financial-Times/n-content-transform","forks_url":"https://api.github.com/repos/Financial-Times/n-content-transform/forks","keys_url":"https://api.github.com/repos/Financial-Times/n-content-transform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Financial-Times/n-content-transform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Financial-Times/n-content-transform/teams","hooks_url":"https://api.github.com/repos/Financial-Times/n-content-transform/hooks","issue_events_url":"https://api.github.com/repos/Financial-Times/n-content-transform/issues/events{/number}","events_url":"https://api.github.com/repos/Financial-Times/n-content-transform/events","assignees_url":"https://api.github.com/repos/Financial-Times/n-content-transform/assignees{/user}","branches_url":"https://api.github.com/repos/Financial-Times/n-content-transform/branches{/branch}","tags_url":"https://api.github.com/repos/Financial-Times/n-content-transform/tags","blobs_url":"https://api.github.com/repos/Financial-Times/n-content-transform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Financial-Times/n-content-transform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Financial-Times/n-content-transform/git/refs{/sha}","trees_url":"https://api.github.com/repos/Financial-Times/n-content-transform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Financial-Times/n-content-transform/statuses/{sha}","languages_url":"https://api.github.com/repos/Financial-Times/n-content-transform/languages","stargazers_url":"https://api.github.com/repos/Financial-Times/n-content-transform/stargazers","contributors_url":"https://api.github.com/repos/Financial-Times/n-content-transform/contributors","subscribers_url":"https://api.github.com/repos/Financial-Times/n-content-transform/subscribers","subscription_url":"https://api.github.com/repos/Financial-Times/n-content-transform/subscription","commits_url":"https://api.github.com/repos/Financial-Times/n-content-transform/commits{/sha}","git_commits_url":"https://api.github.com/repos/Financial-Times/n-content-transform/git/commits{/sha}","comments_url":"https://api.github.com/repos/Financial-Times/n-content-transform/comments{/number}","issue_comment_url":"https://api.github.com/repos/Financial-Times/n-content-transform/issues/comments{/number}","contents_url":"https://api.github.com/repos/Financial-Times/n-content-transform/contents/{+path}","compare_url":"https://api.github.com/repos/Financial-Times/n-content-transform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Financial-Times/n-content-transform/merges","archive_url":"https://api.github.com/repos/Financial-Times/n-content-transform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Financial-Times/n-content-transform/downloads","issues_url":"https://api.github.com/repos/Financial-Times/n-content-transform/issues{/number}","pulls_url":"https://api.github.com/repos/Financial-Times/n-content-transform/pulls{/number}","milestones_url":"https://api.github.com/repos/Financial-Times/n-content-transform/milestones{/number}","notifications_url":"https://api.github.com/repos/Financial-Times/n-content-transform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Financial-Times/n-content-transform/labels{/name}","releases_url":"https://api.github.com/repos/Financial-Times/n-content-transform/releases{/id}","deployments_url":"https://api.github.com/repos/Financial-Times/n-content-transform/deployments","created_at":"2016-03-21T16:16:13Z","updated_at":"2016-04-07T08:58:01Z","pushed_at":"2016-08-04T16:19:14Z","git_url":"git://github.com/Financial-Times/n-content-transform.git","ssh_url":"git@github.com:Financial-Times/n-content-transform.git","clone_url":"https://github.com/Financial-Times/n-content-transform.git","svn_url":"https://github.com/Financial-Times/n-content-transform","homepage":null,"size":39,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Financial-Times:master","ref":"master","sha":"4fd51f4a75fbfd21d2e41537c1bbe647f7d56c8c","user":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"repo":{"id":54404319,"name":"n-content-transform","full_name":"Financial-Times/n-content-transform","owner":{"login":"Financial-Times","id":3502508,"avatar_url":"https://avatars.githubusercontent.com/u/3502508?v=3","gravatar_id":"","url":"https://api.github.com/users/Financial-Times","html_url":"https://github.com/Financial-Times","followers_url":"https://api.github.com/users/Financial-Times/followers","following_url":"https://api.github.com/users/Financial-Times/following{/other_user}","gists_url":"https://api.github.com/users/Financial-Times/gists{/gist_id}","starred_url":"https://api.github.com/users/Financial-Times/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Financial-Times/subscriptions","organizations_url":"https://api.github.com/users/Financial-Times/orgs","repos_url":"https://api.github.com/users/Financial-Times/repos","events_url":"https://api.github.com/users/Financial-Times/events{/privacy}","received_events_url":"https://api.github.com/users/Financial-Times/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Financial-Times/n-content-transform","description":"Further (opinionated) transformation of content html for Next","fork":false,"url":"https://api.github.com/repos/Financial-Times/n-content-transform","forks_url":"https://api.github.com/repos/Financial-Times/n-content-transform/forks","keys_url":"https://api.github.com/repos/Financial-Times/n-content-transform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Financial-Times/n-content-transform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Financial-Times/n-content-transform/teams","hooks_url":"https://api.github.com/repos/Financial-Times/n-content-transform/hooks","issue_events_url":"https://api.github.com/repos/Financial-Times/n-content-transform/issues/events{/number}","events_url":"https://api.github.com/repos/Financial-Times/n-content-transform/events","assignees_url":"https://api.github.com/repos/Financial-Times/n-content-transform/assignees{/user}","branches_url":"https://api.github.com/repos/Financial-Times/n-content-transform/branches{/branch}","tags_url":"https://api.github.com/repos/Financial-Times/n-content-transform/tags","blobs_url":"https://api.github.com/repos/Financial-Times/n-content-transform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Financial-Times/n-content-transform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Financial-Times/n-content-transform/git/refs{/sha}","trees_url":"https://api.github.com/repos/Financial-Times/n-content-transform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Financial-Times/n-content-transform/statuses/{sha}","languages_url":"https://api.github.com/repos/Financial-Times/n-content-transform/languages","stargazers_url":"https://api.github.com/repos/Financial-Times/n-content-transform/stargazers","contributors_url":"https://api.github.com/repos/Financial-Times/n-content-transform/contributors","subscribers_url":"https://api.github.com/repos/Financial-Times/n-content-transform/subscribers","subscription_url":"https://api.github.com/repos/Financial-Times/n-content-transform/subscription","commits_url":"https://api.github.com/repos/Financial-Times/n-content-transform/commits{/sha}","git_commits_url":"https://api.github.com/repos/Financial-Times/n-content-transform/git/commits{/sha}","comments_url":"https://api.github.com/repos/Financial-Times/n-content-transform/comments{/number}","issue_comment_url":"https://api.github.com/repos/Financial-Times/n-content-transform/issues/comments{/number}","contents_url":"https://api.github.com/repos/Financial-Times/n-content-transform/contents/{+path}","compare_url":"https://api.github.com/repos/Financial-Times/n-content-transform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Financial-Times/n-content-transform/merges","archive_url":"https://api.github.com/repos/Financial-Times/n-content-transform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Financial-Times/n-content-transform/downloads","issues_url":"https://api.github.com/repos/Financial-Times/n-content-transform/issues{/number}","pulls_url":"https://api.github.com/repos/Financial-Times/n-content-transform/pulls{/number}","milestones_url":"https://api.github.com/repos/Financial-Times/n-content-transform/milestones{/number}","notifications_url":"https://api.github.com/repos/Financial-Times/n-content-transform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Financial-Times/n-content-transform/labels{/name}","releases_url":"https://api.github.com/repos/Financial-Times/n-content-transform/releases{/id}","deployments_url":"https://api.github.com/repos/Financial-Times/n-content-transform/deployments","created_at":"2016-03-21T16:16:13Z","updated_at":"2016-04-07T08:58:01Z","pushed_at":"2016-08-04T16:19:14Z","git_url":"git://github.com/Financial-Times/n-content-transform.git","ssh_url":"git@github.com:Financial-Times/n-content-transform.git","clone_url":"https://github.com/Financial-Times/n-content-transform.git","svn_url":"https://github.com/Financial-Times/n-content-transform","homepage":null,"size":39,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Financial-Times/n-content-transform/pulls/17"},"html":{"href":"https://github.com/Financial-Times/n-content-transform/pull/17"},"issue":{"href":"https://api.github.com/repos/Financial-Times/n-content-transform/issues/17"},"comments":{"href":"https://api.github.com/repos/Financial-Times/n-content-transform/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/Financial-Times/n-content-transform/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/Financial-Times/n-content-transform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Financial-Times/n-content-transform/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/Financial-Times/n-content-transform/statuses/9f01d3c988e1e05fb802ae52d8841b33653e08c1"}}}}
{"actor":{"display_login":"debugwand"}}