{"action":"created","issue":{"url":"https://api.github.com/repos/alphagov/digitalmarketplace-briefs-frontend/issues/250","repository_url":"https://api.github.com/repos/alphagov/digitalmarketplace-briefs-frontend","labels_url":"https://api.github.com/repos/alphagov/digitalmarketplace-briefs-frontend/issues/250/labels{/name}","comments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-briefs-frontend/issues/250/comments","events_url":"https://api.github.com/repos/alphagov/digitalmarketplace-briefs-frontend/issues/250/events","html_url":"https://github.com/alphagov/digitalmarketplace-briefs-frontend/pull/250","id":532771336,"node_id":"MDExOlB1bGxSZXF1ZXN0MzQ4OTU5NDE0","number":250,"title":"Open DOS preview links in a new tab","user":{"login":"katstevens","id":3492540,"node_id":"MDQ6VXNlcjM0OTI1NDA=","avatar_url":"https://avatars3.githubusercontent.com/u/3492540?v=4","gravatar_id":"","url":"https://api.github.com/users/katstevens","html_url":"https://github.com/katstevens","followers_url":"https://api.github.com/users/katstevens/followers","following_url":"https://api.github.com/users/katstevens/following{/other_user}","gists_url":"https://api.github.com/users/katstevens/gists{/gist_id}","starred_url":"https://api.github.com/users/katstevens/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katstevens/subscriptions","organizations_url":"https://api.github.com/users/katstevens/orgs","repos_url":"https://api.github.com/users/katstevens/repos","events_url":"https://api.github.com/users/katstevens/events{/privacy}","received_events_url":"https://api.github.com/users/katstevens/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-12-04T15:48:34Z","updated_at":"2019-12-04T15:55:54Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/alphagov/digitalmarketplace-briefs-frontend/pulls/250","html_url":"https://github.com/alphagov/digitalmarketplace-briefs-frontend/pull/250","diff_url":"https://github.com/alphagov/digitalmarketplace-briefs-frontend/pull/250.diff","patch_url":"https://github.com/alphagov/digitalmarketplace-briefs-frontend/pull/250.patch"},"body":"https://trello.com/c/WSCRVNH8/149-allow-buyers-to-preview-external-links-on-their-brief\r\n\r\nFor the DOS preview feature, we want to allow buyers to check whether links in their brief content work OK. These links generally go to a 3rd party site (e.g. a public Google drive doc).\r\n\r\nWe already use a template filter `format_links` which picks up plain text URIs like `http://example.com` in user-generated content, and converts them to anchor links `<a href=\"http://example.com\" class=\"break-link\" rel=\"external\">http://example.com</a>`. However in the DOS preview, these links would currently open within the iframe, and it's unlikely they would display correctly (e.g if the site being linked to has disabled the `X-Frame-Options` header - we can't control this). Therefore we want the links to open in a new tab.\r\n\r\nIn https://github.com/alphagov/digitalmarketplace-utils/pull/546 we modified `format_links` to accept a parameter `open_links_in_new_tab`. It seems to work! I've also tested that the published brief then opens the link in the current window, as per the current behaviour.\r\n\r\nThe [WCAG guidelines](https://www.w3.org/TR/WCAG20-TECHS/G200.html) say there should be a warning about any opening-in-new-tab behaviour. It doesn't feel suitable to put this next to the links in the preview pane itself (as suppliers won't see that message when it's published) so I've added a line of content above the panel."},"comment":{"url":"https://api.github.com/repos/alphagov/digitalmarketplace-briefs-frontend/issues/comments/561707824","html_url":"https://github.com/alphagov/digitalmarketplace-briefs-frontend/pull/250#issuecomment-561707824","issue_url":"https://api.github.com/repos/alphagov/digitalmarketplace-briefs-frontend/issues/250","id":561707824,"node_id":"MDEyOklzc3VlQ29tbWVudDU2MTcwNzgyNA==","user":{"login":"lfdebrux","id":503614,"node_id":"MDQ6VXNlcjUwMzYxNA==","avatar_url":"https://avatars3.githubusercontent.com/u/503614?v=4","gravatar_id":"","url":"https://api.github.com/users/lfdebrux","html_url":"https://github.com/lfdebrux","followers_url":"https://api.github.com/users/lfdebrux/followers","following_url":"https://api.github.com/users/lfdebrux/following{/other_user}","gists_url":"https://api.github.com/users/lfdebrux/gists{/gist_id}","starred_url":"https://api.github.com/users/lfdebrux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lfdebrux/subscriptions","organizations_url":"https://api.github.com/users/lfdebrux/orgs","repos_url":"https://api.github.com/users/lfdebrux/repos","events_url":"https://api.github.com/users/lfdebrux/events{/privacy}","received_events_url":"https://api.github.com/users/lfdebrux/received_events","type":"User","site_admin":false},"created_at":"2019-12-04T15:55:54Z","updated_at":"2019-12-04T15:55:54Z","author_association":"CONTRIBUTOR","body":"Good thinking about the content above the panel 👍 "}}
{"actor":{"display_login":"lfdebrux"}}