{"action":"created","issue":{"url":"https://api.github.com/repos/mozilla/pdf.js/issues/7212","repository_url":"https://api.github.com/repos/mozilla/pdf.js","labels_url":"https://api.github.com/repos/mozilla/pdf.js/issues/7212/labels{/name}","comments_url":"https://api.github.com/repos/mozilla/pdf.js/issues/7212/comments","events_url":"https://api.github.com/repos/mozilla/pdf.js/issues/7212/events","html_url":"https://github.com/mozilla/pdf.js/pull/7212","id":148951110,"number":7212,"title":"[api-minor] Add support for `LinkAnnotation`s with relative URLs (bug 766086)","user":{"login":"Snuffleupagus","id":2692120,"avatar_url":"https://avatars.githubusercontent.com/u/2692120?v=3","gravatar_id":"","url":"https://api.github.com/users/Snuffleupagus","html_url":"https://github.com/Snuffleupagus","followers_url":"https://api.github.com/users/Snuffleupagus/followers","following_url":"https://api.github.com/users/Snuffleupagus/following{/other_user}","gists_url":"https://api.github.com/users/Snuffleupagus/gists{/gist_id}","starred_url":"https://api.github.com/users/Snuffleupagus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Snuffleupagus/subscriptions","organizations_url":"https://api.github.com/users/Snuffleupagus/orgs","repos_url":"https://api.github.com/users/Snuffleupagus/repos","events_url":"https://api.github.com/users/Snuffleupagus/events{/privacy}","received_events_url":"https://api.github.com/users/Snuffleupagus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mozilla/pdf.js/labels/1-core","name":"1-core","color":"DDDDDD"},{"url":"https://api.github.com/repos/mozilla/pdf.js/labels/4-annotations","name":"4-annotations","color":"DDDDDD"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-17T13:29:28Z","updated_at":"2016-04-17T13:36:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mozilla/pdf.js/pulls/7212","html_url":"https://github.com/mozilla/pdf.js/pull/7212","diff_url":"https://github.com/mozilla/pdf.js/pull/7212.diff","patch_url":"https://github.com/mozilla/pdf.js/pull/7212.patch"},"body":"This patch moves the validation of URLs, in `LinkAnnotation`, from the `core` to the `display` layer. This should also make the API more useful in custom implementations, since the API will now be able to return relative URLs.\r\n\r\nSome PDF generators unfortunately create files with relative URLs, which thus prevents some inter-PDF links from working in PDF.js. To work-around that case, this patch tries to recover valid absolute URLs in those cases.\r\nThe reason that `PDFLinkService.baseUrl` wasn't re-used, is that this would only work in the Firefox addon/built-in version (and not in e.g. the Chrome addon, or custom implementations).\r\n\r\nFixes https://bugzilla.mozilla.org/show_bug.cgi?id=766086.\r\n\r\nAlso, since the `isValidUrl` utility function is now only used in the `display` layer, it was moved from `shared/util.js` to `display/dom_utils.js`."},"comment":{"url":"https://api.github.com/repos/mozilla/pdf.js/issues/comments/211017087","html_url":"https://github.com/mozilla/pdf.js/pull/7212#issuecomment-211017087","issue_url":"https://api.github.com/repos/mozilla/pdf.js/issues/7212","id":211017087,"user":{"login":"pdfjsbot","id":1036361,"avatar_url":"https://avatars.githubusercontent.com/u/1036361?v=3","gravatar_id":"","url":"https://api.github.com/users/pdfjsbot","html_url":"https://github.com/pdfjsbot","followers_url":"https://api.github.com/users/pdfjsbot/followers","following_url":"https://api.github.com/users/pdfjsbot/following{/other_user}","gists_url":"https://api.github.com/users/pdfjsbot/gists{/gist_id}","starred_url":"https://api.github.com/users/pdfjsbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdfjsbot/subscriptions","organizations_url":"https://api.github.com/users/pdfjsbot/orgs","repos_url":"https://api.github.com/users/pdfjsbot/repos","events_url":"https://api.github.com/users/pdfjsbot/events{/privacy}","received_events_url":"https://api.github.com/users/pdfjsbot/received_events","type":"User","site_admin":false},"created_at":"2016-04-17T13:36:20Z","updated_at":"2016-04-17T13:36:20Z","body":"#### From: Bot.io (Windows)\n\n----\n\n# Received\n\nCommand **cmd_unittest** from @Snuffleupagus received. Current queue size: 0\n\nLive output at: http://107.22.172.223:8877/61684fdf54194f9/output.txt"}}