{"action":"created","comment":{"url":"https://api.github.com/repos/Automattic/amp-wp/pulls/comments/82290539","pull_request_review_id":3209638,"id":82290539,"diff_hunk":"@@ -102,14 +102,18 @@ public function add_or_append_attribute( &$attributes, $key, $value, $separator\n \t * @return string\n \t */\n \tpublic function maybe_enforce_https_src( $src, $force_https = false ) {\n+\t\t$https_required = isset( $this->args['require_https_src'] ) && true === $this->args['require_https_src'];\n \t\t$protocol = strtok( $src, ':' );\n-\t\tif ( 'https' !== $protocol ) {\n+\n+\t\tif ( $protocol === $src && ( $https_required || $force_https ) ) {\n+\t\t\t// src has relative protocol, ie //example.com/asdf, so add https.\n+\t\t\t$src = set_url_scheme( $src, 'https' );","path":"includes/sanitizers/class-amp-base-sanitizer.php","position":null,"original_position":10,"commit_id":"f7dafe58ecf91d8c6c296835390c88727dce3351","original_commit_id":"a689a2c1b51de7723e6817f0de700bb800e7a9b7","user":{"login":"coreymckrill","id":916023,"avatar_url":"https://avatars.githubusercontent.com/u/916023?v=3","gravatar_id":"","url":"https://api.github.com/users/coreymckrill","html_url":"https://github.com/coreymckrill","followers_url":"https://api.github.com/users/coreymckrill/followers","following_url":"https://api.github.com/users/coreymckrill/following{/other_user}","gists_url":"https://api.github.com/users/coreymckrill/gists{/gist_id}","starred_url":"https://api.github.com/users/coreymckrill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreymckrill/subscriptions","organizations_url":"https://api.github.com/users/coreymckrill/orgs","repos_url":"https://api.github.com/users/coreymckrill/repos","events_url":"https://api.github.com/users/coreymckrill/events{/privacy}","received_events_url":"https://api.github.com/users/coreymckrill/received_events","type":"User","site_admin":false},"body":"Alright, I took a stab at handling relative paths along with the relative protocol scenario: f7dafe5","created_at":"2016-10-06T21:34:32Z","updated_at":"2016-10-06T21:34:32Z","html_url":"https://github.com/Automattic/amp-wp/pull/493#discussion_r82290539","pull_request_url":"https://api.github.com/repos/Automattic/amp-wp/pulls/493","_links":{"self":{"href":"https://api.github.com/repos/Automattic/amp-wp/pulls/comments/82290539"},"html":{"href":"https://github.com/Automattic/amp-wp/pull/493#discussion_r82290539"},"pull_request":{"href":"https://api.github.com/repos/Automattic/amp-wp/pulls/493"}}},"pull_request":{"url":"https://api.github.com/repos/Automattic/amp-wp/pulls/493","id":87408913,"html_url":"https://github.com/Automattic/amp-wp/pull/493","diff_url":"https://github.com/Automattic/amp-wp/pull/493.diff","patch_url":"https://github.com/Automattic/amp-wp/pull/493.patch","issue_url":"https://api.github.com/repos/Automattic/amp-wp/issues/493","number":493,"state":"open","locked":false,"title":"Embed fallbacks","user":{"login":"coreymckrill","id":916023,"avatar_url":"https://avatars.githubusercontent.com/u/916023?v=3","gravatar_id":"","url":"https://api.github.com/users/coreymckrill","html_url":"https://github.com/coreymckrill","followers_url":"https://api.github.com/users/coreymckrill/followers","following_url":"https://api.github.com/users/coreymckrill/following{/other_user}","gists_url":"https://api.github.com/users/coreymckrill/gists{/gist_id}","starred_url":"https://api.github.com/users/coreymckrill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreymckrill/subscriptions","organizations_url":"https://api.github.com/users/coreymckrill/orgs","repos_url":"https://api.github.com/users/coreymckrill/repos","events_url":"https://api.github.com/users/coreymckrill/events{/privacy}","received_events_url":"https://api.github.com/users/coreymckrill/received_events","type":"User","site_admin":false},"body":"This is a response to #354. Other related issues are #130, #288, #316, and #350.\r\n\r\nThe goal of this is to provide a consistent user experience when embedded media can't load because it's not from an https source. A few different options were discussed to make this happen, but this is what we settled on:\r\n\r\n> Remove the (embedded) element completely, and replace it with a blockquote or some other block-level element containing the source URL and perhaps a message like “Could not load.”\r\n\r\nHere are the types of embeds that should be covered:\r\n\r\n* [x] Audio\r\n* [x] Video\r\n* [x] iFrame","created_at":"2016-09-29T22:56:29Z","updated_at":"2016-10-06T21:34:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"375f1667ff0cf344d3798b65256144ba939357e9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Automattic/amp-wp/pulls/493/commits","review_comments_url":"https://api.github.com/repos/Automattic/amp-wp/pulls/493/comments","review_comment_url":"https://api.github.com/repos/Automattic/amp-wp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Automattic/amp-wp/issues/493/comments","statuses_url":"https://api.github.com/repos/Automattic/amp-wp/statuses/f7dafe58ecf91d8c6c296835390c88727dce3351","head":{"label":"coreymckrill:fallbacks","ref":"fallbacks","sha":"f7dafe58ecf91d8c6c296835390c88727dce3351","user":{"login":"coreymckrill","id":916023,"avatar_url":"https://avatars.githubusercontent.com/u/916023?v=3","gravatar_id":"","url":"https://api.github.com/users/coreymckrill","html_url":"https://github.com/coreymckrill","followers_url":"https://api.github.com/users/coreymckrill/followers","following_url":"https://api.github.com/users/coreymckrill/following{/other_user}","gists_url":"https://api.github.com/users/coreymckrill/gists{/gist_id}","starred_url":"https://api.github.com/users/coreymckrill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreymckrill/subscriptions","organizations_url":"https://api.github.com/users/coreymckrill/orgs","repos_url":"https://api.github.com/users/coreymckrill/repos","events_url":"https://api.github.com/users/coreymckrill/events{/privacy}","received_events_url":"https://api.github.com/users/coreymckrill/received_events","type":"User","site_admin":false},"repo":{"id":67749006,"name":"amp-wp","full_name":"coreymckrill/amp-wp","owner":{"login":"coreymckrill","id":916023,"avatar_url":"https://avatars.githubusercontent.com/u/916023?v=3","gravatar_id":"","url":"https://api.github.com/users/coreymckrill","html_url":"https://github.com/coreymckrill","followers_url":"https://api.github.com/users/coreymckrill/followers","following_url":"https://api.github.com/users/coreymckrill/following{/other_user}","gists_url":"https://api.github.com/users/coreymckrill/gists{/gist_id}","starred_url":"https://api.github.com/users/coreymckrill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreymckrill/subscriptions","organizations_url":"https://api.github.com/users/coreymckrill/orgs","repos_url":"https://api.github.com/users/coreymckrill/repos","events_url":"https://api.github.com/users/coreymckrill/events{/privacy}","received_events_url":"https://api.github.com/users/coreymckrill/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/coreymckrill/amp-wp","description":"WordPress plugin for adding AMP support","fork":true,"url":"https://api.github.com/repos/coreymckrill/amp-wp","forks_url":"https://api.github.com/repos/coreymckrill/amp-wp/forks","keys_url":"https://api.github.com/repos/coreymckrill/amp-wp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coreymckrill/amp-wp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coreymckrill/amp-wp/teams","hooks_url":"https://api.github.com/repos/coreymckrill/amp-wp/hooks","issue_events_url":"https://api.github.com/repos/coreymckrill/amp-wp/issues/events{/number}","events_url":"https://api.github.com/repos/coreymckrill/amp-wp/events","assignees_url":"https://api.github.com/repos/coreymckrill/amp-wp/assignees{/user}","branches_url":"https://api.github.com/repos/coreymckrill/amp-wp/branches{/branch}","tags_url":"https://api.github.com/repos/coreymckrill/amp-wp/tags","blobs_url":"https://api.github.com/repos/coreymckrill/amp-wp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coreymckrill/amp-wp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coreymckrill/amp-wp/git/refs{/sha}","trees_url":"https://api.github.com/repos/coreymckrill/amp-wp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coreymckrill/amp-wp/statuses/{sha}","languages_url":"https://api.github.com/repos/coreymckrill/amp-wp/languages","stargazers_url":"https://api.github.com/repos/coreymckrill/amp-wp/stargazers","contributors_url":"https://api.github.com/repos/coreymckrill/amp-wp/contributors","subscribers_url":"https://api.github.com/repos/coreymckrill/amp-wp/subscribers","subscription_url":"https://api.github.com/repos/coreymckrill/amp-wp/subscription","commits_url":"https://api.github.com/repos/coreymckrill/amp-wp/commits{/sha}","git_commits_url":"https://api.github.com/repos/coreymckrill/amp-wp/git/commits{/sha}","comments_url":"https://api.github.com/repos/coreymckrill/amp-wp/comments{/number}","issue_comment_url":"https://api.github.com/repos/coreymckrill/amp-wp/issues/comments{/number}","contents_url":"https://api.github.com/repos/coreymckrill/amp-wp/contents/{+path}","compare_url":"https://api.github.com/repos/coreymckrill/amp-wp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coreymckrill/amp-wp/merges","archive_url":"https://api.github.com/repos/coreymckrill/amp-wp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coreymckrill/amp-wp/downloads","issues_url":"https://api.github.com/repos/coreymckrill/amp-wp/issues{/number}","pulls_url":"https://api.github.com/repos/coreymckrill/amp-wp/pulls{/number}","milestones_url":"https://api.github.com/repos/coreymckrill/amp-wp/milestones{/number}","notifications_url":"https://api.github.com/repos/coreymckrill/amp-wp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coreymckrill/amp-wp/labels{/name}","releases_url":"https://api.github.com/repos/coreymckrill/amp-wp/releases{/id}","deployments_url":"https://api.github.com/repos/coreymckrill/amp-wp/deployments","created_at":"2016-09-08T23:50:00Z","updated_at":"2016-09-08T23:50:01Z","pushed_at":"2016-10-06T21:33:48Z","git_url":"git://github.com/coreymckrill/amp-wp.git","ssh_url":"git@github.com:coreymckrill/amp-wp.git","clone_url":"https://github.com/coreymckrill/amp-wp.git","svn_url":"https://github.com/coreymckrill/amp-wp","homepage":"https://wordpress.org/plugins/amp/","size":1957,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Automattic:master","ref":"master","sha":"0276ad68451f58d0691116597b66657b004a6fa0","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":42912130,"name":"amp-wp","full_name":"Automattic/amp-wp","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/amp-wp","description":"WordPress plugin for adding AMP support","fork":false,"url":"https://api.github.com/repos/Automattic/amp-wp","forks_url":"https://api.github.com/repos/Automattic/amp-wp/forks","keys_url":"https://api.github.com/repos/Automattic/amp-wp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/amp-wp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/amp-wp/teams","hooks_url":"https://api.github.com/repos/Automattic/amp-wp/hooks","issue_events_url":"https://api.github.com/repos/Automattic/amp-wp/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/amp-wp/events","assignees_url":"https://api.github.com/repos/Automattic/amp-wp/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/amp-wp/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/amp-wp/tags","blobs_url":"https://api.github.com/repos/Automattic/amp-wp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/amp-wp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/amp-wp/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/amp-wp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/amp-wp/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/amp-wp/languages","stargazers_url":"https://api.github.com/repos/Automattic/amp-wp/stargazers","contributors_url":"https://api.github.com/repos/Automattic/amp-wp/contributors","subscribers_url":"https://api.github.com/repos/Automattic/amp-wp/subscribers","subscription_url":"https://api.github.com/repos/Automattic/amp-wp/subscription","commits_url":"https://api.github.com/repos/Automattic/amp-wp/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/amp-wp/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/amp-wp/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/amp-wp/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/amp-wp/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/amp-wp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/amp-wp/merges","archive_url":"https://api.github.com/repos/Automattic/amp-wp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/amp-wp/downloads","issues_url":"https://api.github.com/repos/Automattic/amp-wp/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/amp-wp/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/amp-wp/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/amp-wp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/amp-wp/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/amp-wp/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/amp-wp/deployments","created_at":"2015-09-22T04:52:15Z","updated_at":"2016-10-06T16:23:41Z","pushed_at":"2016-10-06T21:33:49Z","git_url":"git://github.com/Automattic/amp-wp.git","ssh_url":"git@github.com:Automattic/amp-wp.git","clone_url":"https://github.com/Automattic/amp-wp.git","svn_url":"https://github.com/Automattic/amp-wp","homepage":"https://wordpress.org/plugins/amp/","size":2535,"stargazers_count":805,"watchers_count":805,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":133,"mirror_url":null,"open_issues_count":92,"forks":133,"open_issues":92,"watchers":805,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/amp-wp/pulls/493"},"html":{"href":"https://github.com/Automattic/amp-wp/pull/493"},"issue":{"href":"https://api.github.com/repos/Automattic/amp-wp/issues/493"},"comments":{"href":"https://api.github.com/repos/Automattic/amp-wp/issues/493/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/amp-wp/pulls/493/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/amp-wp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Automattic/amp-wp/pulls/493/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/amp-wp/statuses/f7dafe58ecf91d8c6c296835390c88727dce3351"}}}}
{"actor":{"display_login":"coreymckrill"}}