{"action":"created","comment":{"url":"https://api.github.com/repos/metomi/rose/pulls/comments/50673581","id":50673581,"diff_hunk":"@@ -518,6 +519,19 @@ def view(self, user, suite, path, path_in_tar=None, mode=None):\n         else:\n             file_content = self.suite_engine_proc.is_conf(path)\n         template = self.template_env.get_template(\"view.html\")\n+\n+        # convert url(s) to hyperlinks if in text mode\n+        if mode == None:\n+            anchor = lambda url: '<a href=\"%s\">%s</a>' % (url, url)\n+            urlregex = '(http|https|ftp)://[^\\s]+'","path":"lib/python/rose/bush.py","position":25,"original_position":25,"commit_id":"cc853eaf255328239945f466065aab9f312974c3","original_commit_id":"cc853eaf255328239945f466065aab9f312974c3","user":{"login":"oliver-sanders","id":16705946,"avatar_url":"https://avatars.githubusercontent.com/u/16705946?v=3","gravatar_id":"","url":"https://api.github.com/users/oliver-sanders","html_url":"https://github.com/oliver-sanders","followers_url":"https://api.github.com/users/oliver-sanders/followers","following_url":"https://api.github.com/users/oliver-sanders/following{/other_user}","gists_url":"https://api.github.com/users/oliver-sanders/gists{/gist_id}","starred_url":"https://api.github.com/users/oliver-sanders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliver-sanders/subscriptions","organizations_url":"https://api.github.com/users/oliver-sanders/orgs","repos_url":"https://api.github.com/users/oliver-sanders/repos","events_url":"https://api.github.com/users/oliver-sanders/events{/privacy}","received_events_url":"https://api.github.com/users/oliver-sanders/received_events","type":"User","site_admin":false},"body":"Thanks, that regex is far better.","created_at":"2016-01-25T10:00:42Z","updated_at":"2016-01-25T10:00:42Z","html_url":"https://github.com/metomi/rose/pull/1809#discussion_r50673581","pull_request_url":"https://api.github.com/repos/metomi/rose/pulls/1809","_links":{"self":{"href":"https://api.github.com/repos/metomi/rose/pulls/comments/50673581"},"html":{"href":"https://github.com/metomi/rose/pull/1809#discussion_r50673581"},"pull_request":{"href":"https://api.github.com/repos/metomi/rose/pulls/1809"}}},"pull_request":{"url":"https://api.github.com/repos/metomi/rose/pulls/1809","id":56908624,"html_url":"https://github.com/metomi/rose/pull/1809","diff_url":"https://github.com/metomi/rose/pull/1809.diff","patch_url":"https://github.com/metomi/rose/pull/1809.patch","issue_url":"https://api.github.com/repos/metomi/rose/issues/1809","number":1809,"state":"open","locked":false,"title":"rose bush: view: default to escaping output HTML","user":{"login":"oliver-sanders","id":16705946,"avatar_url":"https://avatars.githubusercontent.com/u/16705946?v=3","gravatar_id":"","url":"https://api.github.com/users/oliver-sanders","html_url":"https://github.com/oliver-sanders","followers_url":"https://api.github.com/users/oliver-sanders/followers","following_url":"https://api.github.com/users/oliver-sanders/following{/other_user}","gists_url":"https://api.github.com/users/oliver-sanders/gists{/gist_id}","starred_url":"https://api.github.com/users/oliver-sanders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliver-sanders/subscriptions","organizations_url":"https://api.github.com/users/oliver-sanders/orgs","repos_url":"https://api.github.com/users/oliver-sanders/repos","events_url":"https://api.github.com/users/oliver-sanders/events{/privacy}","received_events_url":"https://api.github.com/users/oliver-sanders/received_events","type":"User","site_admin":false},"body":"Also added feature to make url(s) clickable when in text mode.\r\ncloses #1684 \r\n@matthewrmshin Please review\r\n@benfitzpatrick Please review","created_at":"2016-01-22T16:23:07Z","updated_at":"2016-01-25T10:00:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"42009384322c7ef4d368c018803b6ecd96c624d0","assignee":{"login":"matthewrmshin","id":908613,"avatar_url":"https://avatars.githubusercontent.com/u/908613?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewrmshin","html_url":"https://github.com/matthewrmshin","followers_url":"https://api.github.com/users/matthewrmshin/followers","following_url":"https://api.github.com/users/matthewrmshin/following{/other_user}","gists_url":"https://api.github.com/users/matthewrmshin/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewrmshin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewrmshin/subscriptions","organizations_url":"https://api.github.com/users/matthewrmshin/orgs","repos_url":"https://api.github.com/users/matthewrmshin/repos","events_url":"https://api.github.com/users/matthewrmshin/events{/privacy}","received_events_url":"https://api.github.com/users/matthewrmshin/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/metomi/rose/milestones/41","html_url":"https://github.com/metomi/rose/milestones/next-release","labels_url":"https://api.github.com/repos/metomi/rose/milestones/41/labels","id":1508673,"number":41,"title":"next-release","description":"Rose release 36","creator":{"login":"matthewrmshin","id":908613,"avatar_url":"https://avatars.githubusercontent.com/u/908613?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewrmshin","html_url":"https://github.com/matthewrmshin","followers_url":"https://api.github.com/users/matthewrmshin/followers","following_url":"https://api.github.com/users/matthewrmshin/following{/other_user}","gists_url":"https://api.github.com/users/matthewrmshin/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewrmshin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewrmshin/subscriptions","organizations_url":"https://api.github.com/users/matthewrmshin/orgs","repos_url":"https://api.github.com/users/matthewrmshin/repos","events_url":"https://api.github.com/users/matthewrmshin/events{/privacy}","received_events_url":"https://api.github.com/users/matthewrmshin/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":3,"state":"open","created_at":"2016-01-15T10:42:44Z","updated_at":"2016-01-25T09:47:13Z","due_on":"2016-02-29T00:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/metomi/rose/pulls/1809/commits","review_comments_url":"https://api.github.com/repos/metomi/rose/pulls/1809/comments","review_comment_url":"https://api.github.com/repos/metomi/rose/pulls/comments{/number}","comments_url":"https://api.github.com/repos/metomi/rose/issues/1809/comments","statuses_url":"https://api.github.com/repos/metomi/rose/statuses/cc853eaf255328239945f466065aab9f312974c3","head":{"label":"oliver-sanders:1693.default-escape-html","ref":"1693.default-escape-html","sha":"cc853eaf255328239945f466065aab9f312974c3","user":{"login":"oliver-sanders","id":16705946,"avatar_url":"https://avatars.githubusercontent.com/u/16705946?v=3","gravatar_id":"","url":"https://api.github.com/users/oliver-sanders","html_url":"https://github.com/oliver-sanders","followers_url":"https://api.github.com/users/oliver-sanders/followers","following_url":"https://api.github.com/users/oliver-sanders/following{/other_user}","gists_url":"https://api.github.com/users/oliver-sanders/gists{/gist_id}","starred_url":"https://api.github.com/users/oliver-sanders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliver-sanders/subscriptions","organizations_url":"https://api.github.com/users/oliver-sanders/orgs","repos_url":"https://api.github.com/users/oliver-sanders/repos","events_url":"https://api.github.com/users/oliver-sanders/events{/privacy}","received_events_url":"https://api.github.com/users/oliver-sanders/received_events","type":"User","site_admin":false},"repo":{"id":49660258,"name":"rose","full_name":"oliver-sanders/rose","owner":{"login":"oliver-sanders","id":16705946,"avatar_url":"https://avatars.githubusercontent.com/u/16705946?v=3","gravatar_id":"","url":"https://api.github.com/users/oliver-sanders","html_url":"https://github.com/oliver-sanders","followers_url":"https://api.github.com/users/oliver-sanders/followers","following_url":"https://api.github.com/users/oliver-sanders/following{/other_user}","gists_url":"https://api.github.com/users/oliver-sanders/gists{/gist_id}","starred_url":"https://api.github.com/users/oliver-sanders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliver-sanders/subscriptions","organizations_url":"https://api.github.com/users/oliver-sanders/orgs","repos_url":"https://api.github.com/users/oliver-sanders/repos","events_url":"https://api.github.com/users/oliver-sanders/events{/privacy}","received_events_url":"https://api.github.com/users/oliver-sanders/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/oliver-sanders/rose","description":"Rose: a framework for managing and running meteorological suites.","fork":true,"url":"https://api.github.com/repos/oliver-sanders/rose","forks_url":"https://api.github.com/repos/oliver-sanders/rose/forks","keys_url":"https://api.github.com/repos/oliver-sanders/rose/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oliver-sanders/rose/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oliver-sanders/rose/teams","hooks_url":"https://api.github.com/repos/oliver-sanders/rose/hooks","issue_events_url":"https://api.github.com/repos/oliver-sanders/rose/issues/events{/number}","events_url":"https://api.github.com/repos/oliver-sanders/rose/events","assignees_url":"https://api.github.com/repos/oliver-sanders/rose/assignees{/user}","branches_url":"https://api.github.com/repos/oliver-sanders/rose/branches{/branch}","tags_url":"https://api.github.com/repos/oliver-sanders/rose/tags","blobs_url":"https://api.github.com/repos/oliver-sanders/rose/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oliver-sanders/rose/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oliver-sanders/rose/git/refs{/sha}","trees_url":"https://api.github.com/repos/oliver-sanders/rose/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oliver-sanders/rose/statuses/{sha}","languages_url":"https://api.github.com/repos/oliver-sanders/rose/languages","stargazers_url":"https://api.github.com/repos/oliver-sanders/rose/stargazers","contributors_url":"https://api.github.com/repos/oliver-sanders/rose/contributors","subscribers_url":"https://api.github.com/repos/oliver-sanders/rose/subscribers","subscription_url":"https://api.github.com/repos/oliver-sanders/rose/subscription","commits_url":"https://api.github.com/repos/oliver-sanders/rose/commits{/sha}","git_commits_url":"https://api.github.com/repos/oliver-sanders/rose/git/commits{/sha}","comments_url":"https://api.github.com/repos/oliver-sanders/rose/comments{/number}","issue_comment_url":"https://api.github.com/repos/oliver-sanders/rose/issues/comments{/number}","contents_url":"https://api.github.com/repos/oliver-sanders/rose/contents/{+path}","compare_url":"https://api.github.com/repos/oliver-sanders/rose/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oliver-sanders/rose/merges","archive_url":"https://api.github.com/repos/oliver-sanders/rose/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oliver-sanders/rose/downloads","issues_url":"https://api.github.com/repos/oliver-sanders/rose/issues{/number}","pulls_url":"https://api.github.com/repos/oliver-sanders/rose/pulls{/number}","milestones_url":"https://api.github.com/repos/oliver-sanders/rose/milestones{/number}","notifications_url":"https://api.github.com/repos/oliver-sanders/rose/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oliver-sanders/rose/labels{/name}","releases_url":"https://api.github.com/repos/oliver-sanders/rose/releases{/id}","deployments_url":"https://api.github.com/repos/oliver-sanders/rose/deployments","created_at":"2016-01-14T16:38:12Z","updated_at":"2016-01-14T16:38:14Z","pushed_at":"2016-01-22T16:18:34Z","git_url":"git://github.com/oliver-sanders/rose.git","ssh_url":"git@github.com:oliver-sanders/rose.git","clone_url":"https://github.com/oliver-sanders/rose.git","svn_url":"https://github.com/oliver-sanders/rose","homepage":"metomi.github.io/rose/doc/","size":13600,"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":"metomi:master","ref":"master","sha":"e8704ddc44c7df3db0560926a796023db2b4f439","user":{"login":"metomi","id":2477494,"avatar_url":"https://avatars.githubusercontent.com/u/2477494?v=3","gravatar_id":"","url":"https://api.github.com/users/metomi","html_url":"https://github.com/metomi","followers_url":"https://api.github.com/users/metomi/followers","following_url":"https://api.github.com/users/metomi/following{/other_user}","gists_url":"https://api.github.com/users/metomi/gists{/gist_id}","starred_url":"https://api.github.com/users/metomi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metomi/subscriptions","organizations_url":"https://api.github.com/users/metomi/orgs","repos_url":"https://api.github.com/users/metomi/repos","events_url":"https://api.github.com/users/metomi/events{/privacy}","received_events_url":"https://api.github.com/users/metomi/received_events","type":"Organization","site_admin":false},"repo":{"id":6223866,"name":"rose","full_name":"metomi/rose","owner":{"login":"metomi","id":2477494,"avatar_url":"https://avatars.githubusercontent.com/u/2477494?v=3","gravatar_id":"","url":"https://api.github.com/users/metomi","html_url":"https://github.com/metomi","followers_url":"https://api.github.com/users/metomi/followers","following_url":"https://api.github.com/users/metomi/following{/other_user}","gists_url":"https://api.github.com/users/metomi/gists{/gist_id}","starred_url":"https://api.github.com/users/metomi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metomi/subscriptions","organizations_url":"https://api.github.com/users/metomi/orgs","repos_url":"https://api.github.com/users/metomi/repos","events_url":"https://api.github.com/users/metomi/events{/privacy}","received_events_url":"https://api.github.com/users/metomi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/metomi/rose","description":"Rose: a framework for managing and running meteorological suites.","fork":false,"url":"https://api.github.com/repos/metomi/rose","forks_url":"https://api.github.com/repos/metomi/rose/forks","keys_url":"https://api.github.com/repos/metomi/rose/keys{/key_id}","collaborators_url":"https://api.github.com/repos/metomi/rose/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/metomi/rose/teams","hooks_url":"https://api.github.com/repos/metomi/rose/hooks","issue_events_url":"https://api.github.com/repos/metomi/rose/issues/events{/number}","events_url":"https://api.github.com/repos/metomi/rose/events","assignees_url":"https://api.github.com/repos/metomi/rose/assignees{/user}","branches_url":"https://api.github.com/repos/metomi/rose/branches{/branch}","tags_url":"https://api.github.com/repos/metomi/rose/tags","blobs_url":"https://api.github.com/repos/metomi/rose/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/metomi/rose/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/metomi/rose/git/refs{/sha}","trees_url":"https://api.github.com/repos/metomi/rose/git/trees{/sha}","statuses_url":"https://api.github.com/repos/metomi/rose/statuses/{sha}","languages_url":"https://api.github.com/repos/metomi/rose/languages","stargazers_url":"https://api.github.com/repos/metomi/rose/stargazers","contributors_url":"https://api.github.com/repos/metomi/rose/contributors","subscribers_url":"https://api.github.com/repos/metomi/rose/subscribers","subscription_url":"https://api.github.com/repos/metomi/rose/subscription","commits_url":"https://api.github.com/repos/metomi/rose/commits{/sha}","git_commits_url":"https://api.github.com/repos/metomi/rose/git/commits{/sha}","comments_url":"https://api.github.com/repos/metomi/rose/comments{/number}","issue_comment_url":"https://api.github.com/repos/metomi/rose/issues/comments{/number}","contents_url":"https://api.github.com/repos/metomi/rose/contents/{+path}","compare_url":"https://api.github.com/repos/metomi/rose/compare/{base}...{head}","merges_url":"https://api.github.com/repos/metomi/rose/merges","archive_url":"https://api.github.com/repos/metomi/rose/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/metomi/rose/downloads","issues_url":"https://api.github.com/repos/metomi/rose/issues{/number}","pulls_url":"https://api.github.com/repos/metomi/rose/pulls{/number}","milestones_url":"https://api.github.com/repos/metomi/rose/milestones{/number}","notifications_url":"https://api.github.com/repos/metomi/rose/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/metomi/rose/labels{/name}","releases_url":"https://api.github.com/repos/metomi/rose/releases{/id}","deployments_url":"https://api.github.com/repos/metomi/rose/deployments","created_at":"2012-10-15T08:31:10Z","updated_at":"2016-01-14T16:02:40Z","pushed_at":"2016-01-22T16:23:07Z","git_url":"git://github.com/metomi/rose.git","ssh_url":"git@github.com:metomi/rose.git","clone_url":"https://github.com/metomi/rose.git","svn_url":"https://github.com/metomi/rose","homepage":"metomi.github.io/rose/doc/","size":16355,"stargazers_count":19,"watchers_count":19,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":21,"mirror_url":null,"open_issues_count":164,"forks":21,"open_issues":164,"watchers":19,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/metomi/rose/pulls/1809"},"html":{"href":"https://github.com/metomi/rose/pull/1809"},"issue":{"href":"https://api.github.com/repos/metomi/rose/issues/1809"},"comments":{"href":"https://api.github.com/repos/metomi/rose/issues/1809/comments"},"review_comments":{"href":"https://api.github.com/repos/metomi/rose/pulls/1809/comments"},"review_comment":{"href":"https://api.github.com/repos/metomi/rose/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/metomi/rose/pulls/1809/commits"},"statuses":{"href":"https://api.github.com/repos/metomi/rose/statuses/cc853eaf255328239945f466065aab9f312974c3"}}}}