payload: {"action":"created","comment":{"url":"https://api.github.com/repos/navikt/pam-stillingsok/pulls/comments/291492479","pull_request_review_id":246965341,"id":291492479,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI5MTQ5MjQ3OQ==","diff_hunk":"@@ -21,13 +21,11 @@ export function formatISOString(isoString, format = 'DD.MM.YYYY') {\n }\n \n export function isValidUrl(input) {\n-    const pattern = new RegExp('^(https?:\\\\/\\\\/)' // protocol (requires http://or https://)\n-        + '((([a-z\\\\d]([a-z\\\\d-]*[a-z\\\\d])*)\\\\.)+[a-z]{2,})' // domain name\n-        + '(\\\\:\\\\d+)?(\\\\/[-a-z\\\\d%_.~+]*)*' // port and path\n-        + '(\\\\?[;&a-z\\\\d%_.~+=-]*)?' // query string\n-        + '(\\\\#[-a-z\\\\d_]*)?$', 'i'); // fragment locater\n-\n-    return pattern.test(input);\n+    try {\n+        return new URL(input).protocol.startsWith('http');","path":"src/utils.js","position":12,"original_position":12,"commit_id":"928291950a5074a9151f4bea465e3b162a694cfc","original_commit_id":"928291950a5074a9151f4bea465e3b162a694cfc","user":{"login":"oyvindstegard","id":4008448,"node_id":"MDQ6VXNlcjQwMDg0NDg=","avatar_url":"https://avatars0.githubusercontent.com/u/4008448?v=4","gravatar_id":"","url":"https://api.github.com/users/oyvindstegard","html_url":"https://github.com/oyvindstegard","followers_url":"https://api.github.com/users/oyvindstegard/followers","following_url":"https://api.github.com/users/oyvindstegard/following{/other_user}","gists_url":"https://api.github.com/users/oyvindstegard/gists{/gist_id}","starred_url":"https://api.github.com/users/oyvindstegard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oyvindstegard/subscriptions","organizations_url":"https://api.github.com/users/oyvindstegard/orgs","repos_url":"https://api.github.com/users/oyvindstegard/repos","events_url":"https://api.github.com/users/oyvindstegard/events{/privacy}","received_events_url":"https://api.github.com/users/oyvindstegard/received_events","type":"User","site_admin":false},"body":"Jeg lager en graceful-degrade på det. Hvis IE11, så vil alltid denne funksjonen returnere `false`, og søknadslenker på stillinger kun vises, men ikke være klikkbare. Synes det er et greit kompromiss.","created_at":"2019-06-07T08:14:24Z","updated_at":"2019-06-07T08:14:24Z","html_url":"https://github.com/navikt/pam-stillingsok/pull/168#discussion_r291492479","pull_request_url":"https://api.github.com/repos/navikt/pam-stillingsok/pulls/168","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/navikt/pam-stillingsok/pulls/comments/291492479"},"html":{"href":"https://github.com/navikt/pam-stillingsok/pull/168#discussion_r291492479"},"pull_request":{"href":"https://api.github.com/repos/navikt/pam-stillingsok/pulls/168"}},"in_reply_to_id":291454447},"pull_request":{"url":"https://api.github.com/repos/navikt/pam-stillingsok/pulls/168","id":285944457,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjg1OTQ0NDU3","html_url":"https://github.com/navikt/pam-stillingsok/pull/168","diff_url":"https://github.com/navikt/pam-stillingsok/pull/168.diff","patch_url":"https://github.com/navikt/pam-stillingsok/pull/168.patch","issue_url":"https://api.github.com/repos/navikt/pam-stillingsok/issues/168","number":168,"state":"open","locked":false,"title":"[PAM-3456] Do not use regexp for URL validation","user":{"login":"oyvindstegard","id":4008448,"node_id":"MDQ6VXNlcjQwMDg0NDg=","avatar_url":"https://avatars0.githubusercontent.com/u/4008448?v=4","gravatar_id":"","url":"https://api.github.com/users/oyvindstegard","html_url":"https://github.com/oyvindstegard","followers_url":"https://api.github.com/users/oyvindstegard/followers","following_url":"https://api.github.com/users/oyvindstegard/following{/other_user}","gists_url":"https://api.github.com/users/oyvindstegard/gists{/gist_id}","starred_url":"https://api.github.com/users/oyvindstegard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oyvindstegard/subscriptions","organizations_url":"https://api.github.com/users/oyvindstegard/orgs","repos_url":"https://api.github.com/users/oyvindstegard/repos","events_url":"https://api.github.com/users/oyvindstegard/events{/privacy}","received_events_url":"https://api.github.com/users/oyvindstegard/received_events","type":"User","site_admin":false},"body":"Universal URL matching is somewhat complex syntactically, so RegExp becomes messy and unreadable.\r\nIn addition, the current version has cases where it hangs the browser due to computational\r\ncomplexity for certain inputs.\r\n\r\nInstead, just parse the URL using browser built-in routines and check that protocol is either http\r\nor https, to validate a link.","created_at":"2019-06-06T19:47:49Z","updated_at":"2019-06-07T08:14:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a8df704ee4aaa9fa57dbd5e09f3b6b3b8fb9d98c","assignee":null,"assignees":[],"requested_reviewers":[{"login":"stephenramthun","id":4243438,"node_id":"MDQ6VXNlcjQyNDM0Mzg=","avatar_url":"https://avatars3.githubusercontent.com/u/4243438?v=4","gravatar_id":"","url":"https://api.github.com/users/stephenramthun","html_url":"https://github.com/stephenramthun","followers_url":"https://api.github.com/users/stephenramthun/followers","following_url":"https://api.github.com/users/stephenramthun/following{/other_user}","gists_url":"https://api.github.com/users/stephenramthun/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenramthun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenramthun/subscriptions","organizations_url":"https://api.github.com/users/stephenramthun/orgs","repos_url":"https://api.github.com/users/stephenramthun/repos","events_url":"https://api.github.com/users/stephenramthun/events{/privacy}","received_events_url":"https://api.github.com/users/stephenramthun/received_events","type":"User","site_admin":false},{"login":"idaons","id":25682301,"node_id":"MDQ6VXNlcjI1NjgyMzAx","avatar_url":"https://avatars2.githubusercontent.com/u/25682301?v=4","gravatar_id":"","url":"https://api.github.com/users/idaons","html_url":"https://github.com/idaons","followers_url":"https://api.github.com/users/idaons/followers","following_url":"https://api.github.com/users/idaons/following{/other_user}","gists_url":"https://api.github.com/users/idaons/gists{/gist_id}","starred_url":"https://api.github.com/users/idaons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idaons/subscriptions","organizations_url":"https://api.github.com/users/idaons/orgs","repos_url":"https://api.github.com/users/idaons/repos","events_url":"https://api.github.com/users/idaons/events{/privacy}","received_events_url":"https://api.github.com/users/idaons/received_events","type":"User","site_admin":false},{"login":"otenav","id":29566394,"node_id":"MDQ6VXNlcjI5NTY2Mzk0","avatar_url":"https://avatars2.githubusercontent.com/u/29566394?v=4","gravatar_id":"","url":"https://api.github.com/users/otenav","html_url":"https://github.com/otenav","followers_url":"https://api.github.com/users/otenav/followers","following_url":"https://api.github.com/users/otenav/following{/other_user}","gists_url":"https://api.github.com/users/otenav/gists{/gist_id}","starred_url":"https://api.github.com/users/otenav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otenav/subscriptions","organizations_url":"https://api.github.com/users/otenav/orgs","repos_url":"https://api.github.com/users/otenav/repos","events_url":"https://api.github.com/users/otenav/events{/privacy}","received_events_url":"https://api.github.com/users/otenav/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/navikt/pam-stillingsok/pulls/168/commits","review_comments_url":"https://api.github.com/repos/navikt/pam-stillingsok/pulls/168/comments","review_comment_url":"https://api.github.com/repos/navikt/pam-stillingsok/pulls/comments{/number}","comments_url":"https://api.github.com/repos/navikt/pam-stillingsok/issues/168/comments","statuses_url":"https://api.github.com/repos/navikt/pam-stillingsok/statuses/928291950a5074a9151f4bea465e3b162a694cfc","head":{"label":"navikt:bug/fix-url-validation","ref":"bug/fix-url-validation","sha":"928291950a5074a9151f4bea465e3b162a694cfc","user":{"login":"navikt","id":11848947,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExODQ4OTQ3","avatar_url":"https://avatars3.githubusercontent.com/u/11848947?v=4","gravatar_id":"","url":"https://api.github.com/users/navikt","html_url":"https://github.com/navikt","followers_url":"https://api.github.com/users/navikt/followers","following_url":"https://api.github.com/users/navikt/following{/other_user}","gists_url":"https://api.github.com/users/navikt/gists{/gist_id}","starred_url":"https://api.github.com/users/navikt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/navikt/subscriptions","organizations_url":"https://api.github.com/users/navikt/orgs","repos_url":"https://api.github.com/users/navikt/repos","events_url":"https://api.github.com/users/navikt/events{/privacy}","received_events_url":"https://api.github.com/users/navikt/received_events","type":"Organization","site_admin":false},"repo":{"id":131998426,"node_id":"MDEwOlJlcG9zaXRvcnkxMzE5OTg0MjY=","name":"pam-stillingsok","full_name":"navikt/pam-stillingsok","private":false,"owner":{"login":"navikt","id":11848947,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExODQ4OTQ3","avatar_url":"https://avatars3.githubusercontent.com/u/11848947?v=4","gravatar_id":"","url":"https://api.github.com/users/navikt","html_url":"https://github.com/navikt","followers_url":"https://api.github.com/users/navikt/followers","following_url":"https://api.github.com/users/navikt/following{/other_user}","gists_url":"https://api.github.com/users/navikt/gists{/gist_id}","starred_url":"https://api.github.com/users/navikt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/navikt/subscriptions","organizations_url":"https://api.github.com/users/navikt/orgs","repos_url":"https://api.github.com/users/navikt/repos","events_url":"https://api.github.com/users/navikt/events{/privacy}","received_events_url":"https://api.github.com/users/navikt/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/navikt/pam-stillingsok","description":"Stilling søk","fork":false,"url":"https://api.github.com/repos/navikt/pam-stillingsok","forks_url":"https://api.github.com/repos/navikt/pam-stillingsok/forks","keys_url":"https://api.github.com/repos/navikt/pam-stillingsok/keys{/key_id}","collaborators_url":"https://api.github.com/repos/navikt/pam-stillingsok/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/navikt/pam-stillingsok/teams","hooks_url":"https://api.github.com/repos/navikt/pam-stillingsok/hooks","issue_events_url":"https://api.github.com/repos/navikt/pam-stillingsok/issues/events{/number}","events_url":"https://api.github.com/repos/navikt/pam-stillingsok/events","assignees_url":"https://api.github.com/repos/navikt/pam-stillingsok/assignees{/user}","branches_url":"https://api.github.com/repos/navikt/pam-stillingsok/branches{/branch}","tags_url":"https://api.github.com/repos/navikt/pam-stillingsok/tags","blobs_url":"https://api.github.com/repos/navikt/pam-stillingsok/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/navikt/pam-stillingsok/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/navikt/pam-stillingsok/git/refs{/sha}","trees_url":"https://api.github.com/repos/navikt/pam-stillingsok/git/trees{/sha}","statuses_url":"https://api.github.com/repos/navikt/pam-stillingsok/statuses/{sha}","languages_url":"https://api.github.com/repos/navikt/pam-stillingsok/languages","stargazers_url":"https://api.github.com/repos/navikt/pam-stillingsok/stargazers","contributors_url":"https://api.github.com/repos/navikt/pam-stillingsok/contributors","subscribers_url":"https://api.github.com/repos/navikt/pam-stillingsok/subscribers","subscription_url":"https://api.github.com/repos/navikt/pam-stillingsok/subscription","commits_url":"https://api.github.com/repos/navikt/pam-stillingsok/commits{/sha}","git_commits_url":"https://api.github.com/repos/navikt/pam-stillingsok/git/commits{/sha}","comments_url":"https://api.github.com/repos/navikt/pam-stillingsok/comments{/number}","issue_comment_url":"https://api.github.com/repos/navikt/pam-stillingsok/issues/comments{/number}","contents_url":"https://api.github.com/repos/navikt/pam-stillingsok/contents/{+path}","compare_url":"https://api.github.com/repos/navikt/pam-stillingsok/compare/{base}...{head}","merges_url":"https://api.github.com/repos/navikt/pam-stillingsok/merges","archive_url":"https://api.github.com/repos/navikt/pam-stillingsok/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/navikt/pam-stillingsok/downloads","issues_url":"https://api.github.com/repos/navikt/pam-stillingsok/issues{/number}","pulls_url":"https://api.github.com/repos/navikt/pam-stillingsok/pulls{/number}","milestones_url":"https://api.github.com/repos/navikt/pam-stillingsok/milestones{/number}","notifications_url":"https://api.github.com/repos/navikt/pam-stillingsok/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/navikt/pam-stillingsok/labels{/name}","releases_url":"https://api.github.com/repos/navikt/pam-stillingsok/releases{/id}","deployments_url":"https://api.github.com/repos/navikt/pam-stillingsok/deployments","created_at":"2018-05-03T13:22:45Z","updated_at":"2019-06-06T11:07:02Z","pushed_at":"2019-06-06T19:47:50Z","git_url":"git://github.com/navikt/pam-stillingsok.git","ssh_url":"git@github.com:navikt/pam-stillingsok.git","clone_url":"https://github.com/navikt/pam-stillingsok.git","svn_url":"https://github.com/navikt/pam-stillingsok","homepage":null,"size":2486,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":6,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":6,"watchers":1,"default_branch":"master"}},"base":{"label":"navikt:master","ref":"master","sha":"ea955a26b3983e4a8e32fc6b31d845dc50afba9d","user":{"login":"navikt","id":11848947,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExODQ4OTQ3","avatar_url":"https://avatars3.githubusercontent.com/u/11848947?v=4","gravatar_id":"","url":"https://api.github.com/users/navikt","html_url":"https://github.com/navikt","followers_url":"https://api.github.com/users/navikt/followers","following_url":"https://api.github.com/users/navikt/following{/other_user}","gists_url":"https://api.github.com/users/navikt/gists{/gist_id}","starred_url":"https://api.github.com/users/navikt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/navikt/subscriptions","organizations_url":"https://api.github.com/users/navikt/orgs","repos_url":"https://api.github.com/users/navikt/repos","events_url":"https://api.github.com/users/navikt/events{/privacy}","received_events_url":"https://api.github.com/users/navikt/received_events","type":"Organization","site_admin":false},"repo":{"id":131998426,"node_id":"MDEwOlJlcG9zaXRvcnkxMzE5OTg0MjY=","name":"pam-stillingsok","full_name":"navikt/pam-stillingsok","private":false,"owner":{"login":"navikt","id":11848947,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExODQ4OTQ3","avatar_url":"https://avatars3.githubusercontent.com/u/11848947?v=4","gravatar_id":"","url":"https://api.github.com/users/navikt","html_url":"https://github.com/navikt","followers_url":"https://api.github.com/users/navikt/followers","following_url":"https://api.github.com/users/navikt/following{/other_user}","gists_url":"https://api.github.com/users/navikt/gists{/gist_id}","starred_url":"https://api.github.com/users/navikt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/navikt/subscriptions","organizations_url":"https://api.github.com/users/navikt/orgs","repos_url":"https://api.github.com/users/navikt/repos","events_url":"https://api.github.com/users/navikt/events{/privacy}","received_events_url":"https://api.github.com/users/navikt/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/navikt/pam-stillingsok","description":"Stilling søk","fork":false,"url":"https://api.github.com/repos/navikt/pam-stillingsok","forks_url":"https://api.github.com/repos/navikt/pam-stillingsok/forks","keys_url":"https://api.github.com/repos/navikt/pam-stillingsok/keys{/key_id}","collaborators_url":"https://api.github.com/repos/navikt/pam-stillingsok/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/navikt/pam-stillingsok/teams","hooks_url":"https://api.github.com/repos/navikt/pam-stillingsok/hooks","issue_events_url":"https://api.github.com/repos/navikt/pam-stillingsok/issues/events{/number}","events_url":"https://api.github.com/repos/navikt/pam-stillingsok/events","assignees_url":"https://api.github.com/repos/navikt/pam-stillingsok/assignees{/user}","branches_url":"https://api.github.com/repos/navikt/pam-stillingsok/branches{/branch}","tags_url":"https://api.github.com/repos/navikt/pam-stillingsok/tags","blobs_url":"https://api.github.com/repos/navikt/pam-stillingsok/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/navikt/pam-stillingsok/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/navikt/pam-stillingsok/git/refs{/sha}","trees_url":"https://api.github.com/repos/navikt/pam-stillingsok/git/trees{/sha}","statuses_url":"https://api.github.com/repos/navikt/pam-stillingsok/statuses/{sha}","languages_url":"https://api.github.com/repos/navikt/pam-stillingsok/languages","stargazers_url":"https://api.github.com/repos/navikt/pam-stillingsok/stargazers","contributors_url":"https://api.github.com/repos/navikt/pam-stillingsok/contributors","subscribers_url":"https://api.github.com/repos/navikt/pam-stillingsok/subscribers","subscription_url":"https://api.github.com/repos/navikt/pam-stillingsok/subscription","commits_url":"https://api.github.com/repos/navikt/pam-stillingsok/commits{/sha}","git_commits_url":"https://api.github.com/repos/navikt/pam-stillingsok/git/commits{/sha}","comments_url":"https://api.github.com/repos/navikt/pam-stillingsok/comments{/number}","issue_comment_url":"https://api.github.com/repos/navikt/pam-stillingsok/issues/comments{/number}","contents_url":"https://api.github.com/repos/navikt/pam-stillingsok/contents/{+path}","compare_url":"https://api.github.com/repos/navikt/pam-stillingsok/compare/{base}...{head}","merges_url":"https://api.github.com/repos/navikt/pam-stillingsok/merges","archive_url":"https://api.github.com/repos/navikt/pam-stillingsok/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/navikt/pam-stillingsok/downloads","issues_url":"https://api.github.com/repos/navikt/pam-stillingsok/issues{/number}","pulls_url":"https://api.github.com/repos/navikt/pam-stillingsok/pulls{/number}","milestones_url":"https://api.github.com/repos/navikt/pam-stillingsok/milestones{/number}","notifications_url":"https://api.github.com/repos/navikt/pam-stillingsok/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/navikt/pam-stillingsok/labels{/name}","releases_url":"https://api.github.com/repos/navikt/pam-stillingsok/releases{/id}","deployments_url":"https://api.github.com/repos/navikt/pam-stillingsok/deployments","created_at":"2018-05-03T13:22:45Z","updated_at":"2019-06-06T11:07:02Z","pushed_at":"2019-06-06T19:47:50Z","git_url":"git://github.com/navikt/pam-stillingsok.git","ssh_url":"git@github.com:navikt/pam-stillingsok.git","clone_url":"https://github.com/navikt/pam-stillingsok.git","svn_url":"https://github.com/navikt/pam-stillingsok","homepage":null,"size":2486,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":6,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":6,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/navikt/pam-stillingsok/pulls/168"},"html":{"href":"https://github.com/navikt/pam-stillingsok/pull/168"},"issue":{"href":"https://api.github.com/repos/navikt/pam-stillingsok/issues/168"},"comments":{"href":"https://api.github.com/repos/navikt/pam-stillingsok/issues/168/comments"},"review_comments":{"href":"https://api.github.com/repos/navikt/pam-stillingsok/pulls/168/comments"},"review_comment":{"href":"https://api.github.com/repos/navikt/pam-stillingsok/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/navikt/pam-stillingsok/pulls/168/commits"},"statuses":{"href":"https://api.github.com/repos/navikt/pam-stillingsok/statuses/928291950a5074a9151f4bea465e3b162a694cfc"}},"author_association":"CONTRIBUTOR"}}
other: {"actor":{"display_login":"oyvindstegard"}}