{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/pontoon/pulls/comments/46712383","id":46712383,"diff_hunk":"@@ -107,6 +107,24 @@ var Pontoon = (function (my) {\n       return $('<div/>').text(string).html()\n     },\n \n+    /*\n+     * Linkifies any traces of URLs present in a given string.\n+     * Usage : string.linkify();\n+     *\n+     * Matches the URL Regex and parses the required matches.\n+     * Can find more than one URL in the given string.\n+     */\n+    linkify: function (string) {\n+      // http://, https://, ftp://\n+      var urlPattern = /\\b(?:https?|ftp):\\/\\/[a-z0-9-+&@#\\/%?=~_|!:,.;]*[a-z0-9-+&@#\\/%=~_|]/gim;\n+      // www. sans http:// or https://\n+      var pseudoUrlPattern = /(^|[^\\/])(www\\.[\\S]+(\\b|$))/gim;\n+\n+      return string\n+        .replace(urlPattern, '<mark class=\"placeable\"><a href=\"$&\">$&</a></mark>')\n+        .replace(pseudoUrlPattern, '<mark class=\"placeable\">$1<a href=\"http://$2\">$2</a></mark>');","path":"pontoon/base/static/js/main.js","position":19,"original_position":19,"commit_id":"1edecfdc37e1849df8772fc17f0ad37968e3e99a","original_commit_id":"1edecfdc37e1849df8772fc17f0ad37968e3e99a","user":{"login":"mathjazz","id":626716,"avatar_url":"https://avatars.githubusercontent.com/u/626716?v=3","gravatar_id":"","url":"https://api.github.com/users/mathjazz","html_url":"https://github.com/mathjazz","followers_url":"https://api.github.com/users/mathjazz/followers","following_url":"https://api.github.com/users/mathjazz/following{/other_user}","gists_url":"https://api.github.com/users/mathjazz/gists{/gist_id}","starred_url":"https://api.github.com/users/mathjazz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mathjazz/subscriptions","organizations_url":"https://api.github.com/users/mathjazz/orgs","repos_url":"https://api.github.com/users/mathjazz/repos","events_url":"https://api.github.com/users/mathjazz/events{/privacy}","received_events_url":"https://api.github.com/users/mathjazz/received_events","type":"User","site_admin":false},"body":"One last thing: we should probably add `target=\"_blank\"` attribute.","created_at":"2015-12-04T18:11:56Z","updated_at":"2015-12-04T18:11:56Z","html_url":"https://github.com/mozilla/pontoon/pull/301#discussion_r46712383","pull_request_url":"https://api.github.com/repos/mozilla/pontoon/pulls/301","_links":{"self":{"href":"https://api.github.com/repos/mozilla/pontoon/pulls/comments/46712383"},"html":{"href":"https://github.com/mozilla/pontoon/pull/301#discussion_r46712383"},"pull_request":{"href":"https://api.github.com/repos/mozilla/pontoon/pulls/301"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/pontoon/pulls/301","id":52695388,"html_url":"https://github.com/mozilla/pontoon/pull/301","diff_url":"https://github.com/mozilla/pontoon/pull/301.diff","patch_url":"https://github.com/mozilla/pontoon/pull/301.patch","issue_url":"https://api.github.com/repos/mozilla/pontoon/issues/301","number":301,"state":"open","locked":false,"title":"Fix Bug 1208569: Autolinkify texts, introduces linkify string prototype","user":{"login":"sudheesh001","id":4545925,"avatar_url":"https://avatars.githubusercontent.com/u/4545925?v=3","gravatar_id":"","url":"https://api.github.com/users/sudheesh001","html_url":"https://github.com/sudheesh001","followers_url":"https://api.github.com/users/sudheesh001/followers","following_url":"https://api.github.com/users/sudheesh001/following{/other_user}","gists_url":"https://api.github.com/users/sudheesh001/gists{/gist_id}","starred_url":"https://api.github.com/users/sudheesh001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sudheesh001/subscriptions","organizations_url":"https://api.github.com/users/sudheesh001/orgs","repos_url":"https://api.github.com/users/sudheesh001/repos","events_url":"https://api.github.com/users/sudheesh001/events{/privacy}","received_events_url":"https://api.github.com/users/sudheesh001/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-04T17:10:45Z","updated_at":"2015-12-04T18:11:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bb0a5efa3f2c2037b0a117f5d1f7c0e291d6013f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/pontoon/pulls/301/commits","review_comments_url":"https://api.github.com/repos/mozilla/pontoon/pulls/301/comments","review_comment_url":"https://api.github.com/repos/mozilla/pontoon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/pontoon/issues/301/comments","statuses_url":"https://api.github.com/repos/mozilla/pontoon/statuses/1edecfdc37e1849df8772fc17f0ad37968e3e99a","head":{"label":"sudheesh001:Patch_1208569","ref":"Patch_1208569","sha":"1edecfdc37e1849df8772fc17f0ad37968e3e99a","user":{"login":"sudheesh001","id":4545925,"avatar_url":"https://avatars.githubusercontent.com/u/4545925?v=3","gravatar_id":"","url":"https://api.github.com/users/sudheesh001","html_url":"https://github.com/sudheesh001","followers_url":"https://api.github.com/users/sudheesh001/followers","following_url":"https://api.github.com/users/sudheesh001/following{/other_user}","gists_url":"https://api.github.com/users/sudheesh001/gists{/gist_id}","starred_url":"https://api.github.com/users/sudheesh001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sudheesh001/subscriptions","organizations_url":"https://api.github.com/users/sudheesh001/orgs","repos_url":"https://api.github.com/users/sudheesh001/repos","events_url":"https://api.github.com/users/sudheesh001/events{/privacy}","received_events_url":"https://api.github.com/users/sudheesh001/received_events","type":"User","site_admin":false},"repo":{"id":19352912,"name":"pontoon","full_name":"sudheesh001/pontoon","owner":{"login":"sudheesh001","id":4545925,"avatar_url":"https://avatars.githubusercontent.com/u/4545925?v=3","gravatar_id":"","url":"https://api.github.com/users/sudheesh001","html_url":"https://github.com/sudheesh001","followers_url":"https://api.github.com/users/sudheesh001/followers","following_url":"https://api.github.com/users/sudheesh001/following{/other_user}","gists_url":"https://api.github.com/users/sudheesh001/gists{/gist_id}","starred_url":"https://api.github.com/users/sudheesh001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sudheesh001/subscriptions","organizations_url":"https://api.github.com/users/sudheesh001/orgs","repos_url":"https://api.github.com/users/sudheesh001/repos","events_url":"https://api.github.com/users/sudheesh001/events{/privacy}","received_events_url":"https://api.github.com/users/sudheesh001/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sudheesh001/pontoon","description":"In-place website localization tool","fork":true,"url":"https://api.github.com/repos/sudheesh001/pontoon","forks_url":"https://api.github.com/repos/sudheesh001/pontoon/forks","keys_url":"https://api.github.com/repos/sudheesh001/pontoon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sudheesh001/pontoon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sudheesh001/pontoon/teams","hooks_url":"https://api.github.com/repos/sudheesh001/pontoon/hooks","issue_events_url":"https://api.github.com/repos/sudheesh001/pontoon/issues/events{/number}","events_url":"https://api.github.com/repos/sudheesh001/pontoon/events","assignees_url":"https://api.github.com/repos/sudheesh001/pontoon/assignees{/user}","branches_url":"https://api.github.com/repos/sudheesh001/pontoon/branches{/branch}","tags_url":"https://api.github.com/repos/sudheesh001/pontoon/tags","blobs_url":"https://api.github.com/repos/sudheesh001/pontoon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sudheesh001/pontoon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sudheesh001/pontoon/git/refs{/sha}","trees_url":"https://api.github.com/repos/sudheesh001/pontoon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sudheesh001/pontoon/statuses/{sha}","languages_url":"https://api.github.com/repos/sudheesh001/pontoon/languages","stargazers_url":"https://api.github.com/repos/sudheesh001/pontoon/stargazers","contributors_url":"https://api.github.com/repos/sudheesh001/pontoon/contributors","subscribers_url":"https://api.github.com/repos/sudheesh001/pontoon/subscribers","subscription_url":"https://api.github.com/repos/sudheesh001/pontoon/subscription","commits_url":"https://api.github.com/repos/sudheesh001/pontoon/commits{/sha}","git_commits_url":"https://api.github.com/repos/sudheesh001/pontoon/git/commits{/sha}","comments_url":"https://api.github.com/repos/sudheesh001/pontoon/comments{/number}","issue_comment_url":"https://api.github.com/repos/sudheesh001/pontoon/issues/comments{/number}","contents_url":"https://api.github.com/repos/sudheesh001/pontoon/contents/{+path}","compare_url":"https://api.github.com/repos/sudheesh001/pontoon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sudheesh001/pontoon/merges","archive_url":"https://api.github.com/repos/sudheesh001/pontoon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sudheesh001/pontoon/downloads","issues_url":"https://api.github.com/repos/sudheesh001/pontoon/issues{/number}","pulls_url":"https://api.github.com/repos/sudheesh001/pontoon/pulls{/number}","milestones_url":"https://api.github.com/repos/sudheesh001/pontoon/milestones{/number}","notifications_url":"https://api.github.com/repos/sudheesh001/pontoon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sudheesh001/pontoon/labels{/name}","releases_url":"https://api.github.com/repos/sudheesh001/pontoon/releases{/id}","created_at":"2014-05-01T18:03:59Z","updated_at":"2015-05-05T18:19:49Z","pushed_at":"2015-12-04T18:04:50Z","git_url":"git://github.com/sudheesh001/pontoon.git","ssh_url":"git@github.com:sudheesh001/pontoon.git","clone_url":"https://github.com/sudheesh001/pontoon.git","svn_url":"https://github.com/sudheesh001/pontoon","homepage":"https://pontoon.mozillalabs.com/","size":18602,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"mozilla:master","ref":"master","sha":"6fa1f66061c71c281b155964f562e55e667de571","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","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":1385890,"name":"pontoon","full_name":"mozilla/pontoon","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","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/pontoon","description":"In-place localization tool","fork":false,"url":"https://api.github.com/repos/mozilla/pontoon","forks_url":"https://api.github.com/repos/mozilla/pontoon/forks","keys_url":"https://api.github.com/repos/mozilla/pontoon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/pontoon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/pontoon/teams","hooks_url":"https://api.github.com/repos/mozilla/pontoon/hooks","issue_events_url":"https://api.github.com/repos/mozilla/pontoon/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/pontoon/events","assignees_url":"https://api.github.com/repos/mozilla/pontoon/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/pontoon/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/pontoon/tags","blobs_url":"https://api.github.com/repos/mozilla/pontoon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/pontoon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/pontoon/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/pontoon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/pontoon/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/pontoon/languages","stargazers_url":"https://api.github.com/repos/mozilla/pontoon/stargazers","contributors_url":"https://api.github.com/repos/mozilla/pontoon/contributors","subscribers_url":"https://api.github.com/repos/mozilla/pontoon/subscribers","subscription_url":"https://api.github.com/repos/mozilla/pontoon/subscription","commits_url":"https://api.github.com/repos/mozilla/pontoon/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/pontoon/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/pontoon/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/pontoon/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/pontoon/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/pontoon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/pontoon/merges","archive_url":"https://api.github.com/repos/mozilla/pontoon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/pontoon/downloads","issues_url":"https://api.github.com/repos/mozilla/pontoon/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/pontoon/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/pontoon/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/pontoon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/pontoon/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/pontoon/releases{/id}","created_at":"2011-02-19T11:25:51Z","updated_at":"2015-12-01T02:21:02Z","pushed_at":"2015-12-04T18:04:51Z","git_url":"git://github.com/mozilla/pontoon.git","ssh_url":"git@github.com:mozilla/pontoon.git","clone_url":"https://github.com/mozilla/pontoon.git","svn_url":"https://github.com/mozilla/pontoon","homepage":"https://pontoon.mozilla.org/","size":18873,"stargazers_count":86,"watchers_count":86,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":33,"mirror_url":null,"open_issues_count":8,"forks":33,"open_issues":8,"watchers":86,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/pontoon/pulls/301"},"html":{"href":"https://github.com/mozilla/pontoon/pull/301"},"issue":{"href":"https://api.github.com/repos/mozilla/pontoon/issues/301"},"comments":{"href":"https://api.github.com/repos/mozilla/pontoon/issues/301/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/pontoon/pulls/301/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/pontoon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/pontoon/pulls/301/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/pontoon/statuses/1edecfdc37e1849df8772fc17f0ad37968e3e99a"}}}}