{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/readability/pulls/comments/170544399","pull_request_review_id":99243550,"id":170544399,"diff_hunk":"@@ -295,6 +295,9 @@ Readability.prototype = {\n \n       // Standard relative URI; add entire path. pathBase already includes a\n       // trailing \"/\".\n+      if (baseElementPath)\n+        return toAbsoluteURI(baseElementPath) + uri;","path":"Readability.js","position":26,"original_position":26,"commit_id":"1dc41c3554ee463faf2596403ba34d0848606e33","original_commit_id":"1dc41c3554ee463faf2596403ba34d0848606e33","user":{"login":"gijsk","id":375983,"avatar_url":"https://avatars3.githubusercontent.com/u/375983?v=4","gravatar_id":"","url":"https://api.github.com/users/gijsk","html_url":"https://github.com/gijsk","followers_url":"https://api.github.com/users/gijsk/followers","following_url":"https://api.github.com/users/gijsk/following{/other_user}","gists_url":"https://api.github.com/users/gijsk/gists{/gist_id}","starred_url":"https://api.github.com/users/gijsk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gijsk/subscriptions","organizations_url":"https://api.github.com/users/gijsk/orgs","repos_url":"https://api.github.com/users/gijsk/repos","events_url":"https://api.github.com/users/gijsk/events{/privacy}","received_events_url":"https://api.github.com/users/gijsk/received_events","type":"User","site_admin":false},"body":"It may be worth having a test case for a relative plain `<base>` element as well (e.g. `<base href=\"foopath/\"/>`).","created_at":"2018-02-26T10:12:14Z","updated_at":"2018-02-26T10:12:14Z","html_url":"https://github.com/mozilla/readability/pull/422#discussion_r170544399","pull_request_url":"https://api.github.com/repos/mozilla/readability/pulls/422","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/mozilla/readability/pulls/comments/170544399"},"html":{"href":"https://github.com/mozilla/readability/pull/422#discussion_r170544399"},"pull_request":{"href":"https://api.github.com/repos/mozilla/readability/pulls/422"}},"in_reply_to_id":170543411},"pull_request":{"url":"https://api.github.com/repos/mozilla/readability/pulls/422","id":171258057,"html_url":"https://github.com/mozilla/readability/pull/422","diff_url":"https://github.com/mozilla/readability/pull/422.diff","patch_url":"https://github.com/mozilla/readability/pull/422.patch","issue_url":"https://api.github.com/repos/mozilla/readability/issues/422","number":422,"state":"open","locked":false,"title":"Fix relative URL's for pages with a <base/> element.","user":{"login":"bradphilips","id":1027864,"avatar_url":"https://avatars2.githubusercontent.com/u/1027864?v=4","gravatar_id":"","url":"https://api.github.com/users/bradphilips","html_url":"https://github.com/bradphilips","followers_url":"https://api.github.com/users/bradphilips/followers","following_url":"https://api.github.com/users/bradphilips/following{/other_user}","gists_url":"https://api.github.com/users/bradphilips/gists{/gist_id}","starred_url":"https://api.github.com/users/bradphilips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradphilips/subscriptions","organizations_url":"https://api.github.com/users/bradphilips/orgs","repos_url":"https://api.github.com/users/bradphilips/repos","events_url":"https://api.github.com/users/bradphilips/events{/privacy}","received_events_url":"https://api.github.com/users/bradphilips/received_events","type":"User","site_admin":false},"body":"This fixes relative URL's for pages with a <base/> element. This [base element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base) is intended to override the base path for root-less relative url's. For example:\r\n\r\n```html\r\n<base href=\"/\"/> \r\n...\r\n<img src=\"images/image.png\"/>\r\n```\r\n\r\nThe image in the source, if on http://www.somedomain.com/somepath/article, should resolve to http://www.somedomain.com/images/image.png given the base element relative to the path root \"/\".\r\n\r\nReadability is currently not taking this into account and simply treating it as a path relative to the page, and resolving it to http://www.somedomain.com/somepath/images/image.png which is incorrect.\r\n\r\nLet me know if you have questions. Thanks!","created_at":"2018-02-25T23:21:14Z","updated_at":"2018-02-26T10:12:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e543e2b611394a87fbb08d2ddfe419938fec65df","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/readability/pulls/422/commits","review_comments_url":"https://api.github.com/repos/mozilla/readability/pulls/422/comments","review_comment_url":"https://api.github.com/repos/mozilla/readability/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/readability/issues/422/comments","statuses_url":"https://api.github.com/repos/mozilla/readability/statuses/1dc41c3554ee463faf2596403ba34d0848606e33","head":{"label":"bradphilips:master","ref":"master","sha":"1dc41c3554ee463faf2596403ba34d0848606e33","user":{"login":"bradphilips","id":1027864,"avatar_url":"https://avatars2.githubusercontent.com/u/1027864?v=4","gravatar_id":"","url":"https://api.github.com/users/bradphilips","html_url":"https://github.com/bradphilips","followers_url":"https://api.github.com/users/bradphilips/followers","following_url":"https://api.github.com/users/bradphilips/following{/other_user}","gists_url":"https://api.github.com/users/bradphilips/gists{/gist_id}","starred_url":"https://api.github.com/users/bradphilips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradphilips/subscriptions","organizations_url":"https://api.github.com/users/bradphilips/orgs","repos_url":"https://api.github.com/users/bradphilips/repos","events_url":"https://api.github.com/users/bradphilips/events{/privacy}","received_events_url":"https://api.github.com/users/bradphilips/received_events","type":"User","site_admin":false},"repo":{"id":122880939,"name":"readability","full_name":"bradphilips/readability","owner":{"login":"bradphilips","id":1027864,"avatar_url":"https://avatars2.githubusercontent.com/u/1027864?v=4","gravatar_id":"","url":"https://api.github.com/users/bradphilips","html_url":"https://github.com/bradphilips","followers_url":"https://api.github.com/users/bradphilips/followers","following_url":"https://api.github.com/users/bradphilips/following{/other_user}","gists_url":"https://api.github.com/users/bradphilips/gists{/gist_id}","starred_url":"https://api.github.com/users/bradphilips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradphilips/subscriptions","organizations_url":"https://api.github.com/users/bradphilips/orgs","repos_url":"https://api.github.com/users/bradphilips/repos","events_url":"https://api.github.com/users/bradphilips/events{/privacy}","received_events_url":"https://api.github.com/users/bradphilips/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bradphilips/readability","description":"A standalone version of the readability lib","fork":true,"url":"https://api.github.com/repos/bradphilips/readability","forks_url":"https://api.github.com/repos/bradphilips/readability/forks","keys_url":"https://api.github.com/repos/bradphilips/readability/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bradphilips/readability/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bradphilips/readability/teams","hooks_url":"https://api.github.com/repos/bradphilips/readability/hooks","issue_events_url":"https://api.github.com/repos/bradphilips/readability/issues/events{/number}","events_url":"https://api.github.com/repos/bradphilips/readability/events","assignees_url":"https://api.github.com/repos/bradphilips/readability/assignees{/user}","branches_url":"https://api.github.com/repos/bradphilips/readability/branches{/branch}","tags_url":"https://api.github.com/repos/bradphilips/readability/tags","blobs_url":"https://api.github.com/repos/bradphilips/readability/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bradphilips/readability/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bradphilips/readability/git/refs{/sha}","trees_url":"https://api.github.com/repos/bradphilips/readability/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bradphilips/readability/statuses/{sha}","languages_url":"https://api.github.com/repos/bradphilips/readability/languages","stargazers_url":"https://api.github.com/repos/bradphilips/readability/stargazers","contributors_url":"https://api.github.com/repos/bradphilips/readability/contributors","subscribers_url":"https://api.github.com/repos/bradphilips/readability/subscribers","subscription_url":"https://api.github.com/repos/bradphilips/readability/subscription","commits_url":"https://api.github.com/repos/bradphilips/readability/commits{/sha}","git_commits_url":"https://api.github.com/repos/bradphilips/readability/git/commits{/sha}","comments_url":"https://api.github.com/repos/bradphilips/readability/comments{/number}","issue_comment_url":"https://api.github.com/repos/bradphilips/readability/issues/comments{/number}","contents_url":"https://api.github.com/repos/bradphilips/readability/contents/{+path}","compare_url":"https://api.github.com/repos/bradphilips/readability/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bradphilips/readability/merges","archive_url":"https://api.github.com/repos/bradphilips/readability/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bradphilips/readability/downloads","issues_url":"https://api.github.com/repos/bradphilips/readability/issues{/number}","pulls_url":"https://api.github.com/repos/bradphilips/readability/pulls{/number}","milestones_url":"https://api.github.com/repos/bradphilips/readability/milestones{/number}","notifications_url":"https://api.github.com/repos/bradphilips/readability/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bradphilips/readability/labels{/name}","releases_url":"https://api.github.com/repos/bradphilips/readability/releases{/id}","deployments_url":"https://api.github.com/repos/bradphilips/readability/deployments","created_at":"2018-02-25T21:52:54Z","updated_at":"2018-02-25T21:52:56Z","pushed_at":"2018-02-25T23:26:44Z","git_url":"git://github.com/bradphilips/readability.git","ssh_url":"git@github.com:bradphilips/readability.git","clone_url":"https://github.com/bradphilips/readability.git","svn_url":"https://github.com/bradphilips/readability","homepage":null,"size":4006,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"264b8e8968dc0299d9b18d261a13d00d15baa040","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":30231828,"name":"readability","full_name":"mozilla/readability","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/readability","description":"A standalone version of the readability lib","fork":false,"url":"https://api.github.com/repos/mozilla/readability","forks_url":"https://api.github.com/repos/mozilla/readability/forks","keys_url":"https://api.github.com/repos/mozilla/readability/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/readability/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/readability/teams","hooks_url":"https://api.github.com/repos/mozilla/readability/hooks","issue_events_url":"https://api.github.com/repos/mozilla/readability/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/readability/events","assignees_url":"https://api.github.com/repos/mozilla/readability/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/readability/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/readability/tags","blobs_url":"https://api.github.com/repos/mozilla/readability/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/readability/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/readability/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/readability/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/readability/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/readability/languages","stargazers_url":"https://api.github.com/repos/mozilla/readability/stargazers","contributors_url":"https://api.github.com/repos/mozilla/readability/contributors","subscribers_url":"https://api.github.com/repos/mozilla/readability/subscribers","subscription_url":"https://api.github.com/repos/mozilla/readability/subscription","commits_url":"https://api.github.com/repos/mozilla/readability/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/readability/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/readability/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/readability/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/readability/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/readability/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/readability/merges","archive_url":"https://api.github.com/repos/mozilla/readability/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/readability/downloads","issues_url":"https://api.github.com/repos/mozilla/readability/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/readability/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/readability/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/readability/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/readability/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/readability/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/readability/deployments","created_at":"2015-02-03T08:01:54Z","updated_at":"2018-02-23T09:11:53Z","pushed_at":"2018-02-25T23:26:45Z","git_url":"git://github.com/mozilla/readability.git","ssh_url":"git@github.com:mozilla/readability.git","clone_url":"https://github.com/mozilla/readability.git","svn_url":"https://github.com/mozilla/readability","homepage":null,"size":3981,"stargazers_count":1139,"watchers_count":1139,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":175,"mirror_url":null,"archived":false,"open_issues_count":140,"license":null,"forks":175,"open_issues":140,"watchers":1139,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/readability/pulls/422"},"html":{"href":"https://github.com/mozilla/readability/pull/422"},"issue":{"href":"https://api.github.com/repos/mozilla/readability/issues/422"},"comments":{"href":"https://api.github.com/repos/mozilla/readability/issues/422/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/readability/pulls/422/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/readability/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/readability/pulls/422/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/readability/statuses/1dc41c3554ee463faf2596403ba34d0848606e33"}},"author_association":"NONE"}}
{"actor":{"display_login":"gijsk"}}