GitHub PullRequestReviewCommentEvent at 2014-10-20 18:33:40
Repository: brackets
Actor: peterflynn
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/adobe/brackets/pulls/comments/19103884","id":19103884,"diff_hunk":"@@ -533,6 +534,14 @@ define(function (require, exports, module) {\n         return 0;\n     }\n \n+    function encodeFilePath(path) {","path":"src/file/FileUtils.js","position":4,"original_position":14,"commit_id":"aada324e8e4e9435fb6a333910fff7f262102c4c","original_commit_id":"84f3bdbdbb99242ef1fdc32f641015610f2a427f","user":{"login":"peterflynn","id":1197510,"avatar_url":"https://avatars.githubusercontent.com/u/1197510?v=2","gravatar_id":"","url":"https://api.github.com/users/peterflynn","html_url":"https://github.com/peterflynn","followers_url":"https://api.github.com/users/peterflynn/followers","following_url":"https://api.github.com/users/peterflynn/following{/other_user}","gists_url":"https://api.github.com/users/peterflynn/gists{/gist_id}","starred_url":"https://api.github.com/users/peterflynn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterflynn/subscriptions","organizations_url":"https://api.github.com/users/peterflynn/orgs","repos_url":"https://api.github.com/users/peterflynn/repos","events_url":"https://api.github.com/users/peterflynn/events{/privacy}","received_events_url":"https://api.github.com/users/peterflynn/received_events","type":"User","site_admin":false},"body":"Would be good to add a short comment here, something like:\r\n\r\n```\r\n/**\r\n * @param {string} path Native path in the format used by FileSystemEntry.fullPath\r\n * @return {string} URI-encoded version suitable for appending to 'file:///`. It's not safe to use encodeURI()\r\n *     directly since it doesn't escape chars like \"#\".\r\n */\r\n```","created_at":"2014-10-20T18:33:40Z","updated_at":"2014-10-20T18:33:40Z","html_url":"https://github.com/adobe/brackets/pull/9190#discussion_r19103884","pull_request_url":"https://api.github.com/repos/adobe/brackets/pulls/9190","_links":{"self":{"href":"https://api.github.com/repos/adobe/brackets/pulls/comments/19103884"},"html":{"href":"https://github.com/adobe/brackets/pull/9190#discussion_r19103884"},"pull_request":{"href":"https://api.github.com/repos/adobe/brackets/pulls/9190"}}},"pull_request":{"url":"https://api.github.com/repos/adobe/brackets/pulls/9190","id":21550478,"html_url":"https://github.com/adobe/brackets/pull/9190","diff_url":"https://github.com/adobe/brackets/pull/9190.diff","patch_url":"https://github.com/adobe/brackets/pull/9190.patch","issue_url":"https://api.github.com/repos/adobe/brackets/issues/9190","number":9190,"state":"open","locked":false,"title":"Add encodeFilePath to FileUtils to convert file paths into encoded strings (replace metacharacters such as %, @, $, #, etc.)","user":{"login":"Mark-Simulacrum","id":5047365,"avatar_url":"https://avatars.githubusercontent.com/u/5047365?v=2","gravatar_id":"","url":"https://api.github.com/users/Mark-Simulacrum","html_url":"https://github.com/Mark-Simulacrum","followers_url":"https://api.github.com/users/Mark-Simulacrum/followers","following_url":"https://api.github.com/users/Mark-Simulacrum/following{/other_user}","gists_url":"https://api.github.com/users/Mark-Simulacrum/gists{/gist_id}","starred_url":"https://api.github.com/users/Mark-Simulacrum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mark-Simulacrum/subscriptions","organizations_url":"https://api.github.com/users/Mark-Simulacrum/orgs","repos_url":"https://api.github.com/users/Mark-Simulacrum/repos","events_url":"https://api.github.com/users/Mark-Simulacrum/events{/privacy}","received_events_url":"https://api.github.com/users/Mark-Simulacrum/received_events","type":"User","site_admin":false},"body":"Cannot use encodeURI/encodeURIComponent because they replace `#` with `%25`, which is incorrect - should be replaced by `%23`.\r\n\r\nI'm not sure if there is a Brackets' utility for this already (I searched for it but couldn't find it).\r\n\r\nI've tested with `test#tt.jpg` and `test%tt.jpg`, but nothing else - are there any other special characters that should be added to this replace scheme?\r\n\r\nShould this be moved to a module in `utils/` and loaded from ImageViewer?\r\n\r\nFixes #9117.","created_at":"2014-09-21T17:42:11Z","updated_at":"2014-10-20T18:33:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4d35aca05d510e084cdd736d46699ce6e6dcf12e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/adobe/brackets/pulls/9190/commits","review_comments_url":"https://api.github.com/repos/adobe/brackets/pulls/9190/comments","review_comment_url":"https://api.github.com/repos/adobe/brackets/pulls/comments/{number}","comments_url":"https://api.github.com/repos/adobe/brackets/issues/9190/comments","statuses_url":"https://api.github.com/repos/adobe/brackets/statuses/aada324e8e4e9435fb6a333910fff7f262102c4c","head":{"label":"Mark-Simulacrum:issue-9117","ref":"issue-9117","sha":"aada324e8e4e9435fb6a333910fff7f262102c4c","user":{"login":"Mark-Simulacrum","id":5047365,"avatar_url":"https://avatars.githubusercontent.com/u/5047365?v=2","gravatar_id":"","url":"https://api.github.com/users/Mark-Simulacrum","html_url":"https://github.com/Mark-Simulacrum","followers_url":"https://api.github.com/users/Mark-Simulacrum/followers","following_url":"https://api.github.com/users/Mark-Simulacrum/following{/other_user}","gists_url":"https://api.github.com/users/Mark-Simulacrum/gists{/gist_id}","starred_url":"https://api.github.com/users/Mark-Simulacrum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mark-Simulacrum/subscriptions","organizations_url":"https://api.github.com/users/Mark-Simulacrum/orgs","repos_url":"https://api.github.com/users/Mark-Simulacrum/repos","events_url":"https://api.github.com/users/Mark-Simulacrum/events{/privacy}","received_events_url":"https://api.github.com/users/Mark-Simulacrum/received_events","type":"User","site_admin":false},"repo":{"id":22489474,"name":"brackets","full_name":"Mark-Simulacrum/brackets","owner":{"login":"Mark-Simulacrum","id":5047365,"avatar_url":"https://avatars.githubusercontent.com/u/5047365?v=2","gravatar_id":"","url":"https://api.github.com/users/Mark-Simulacrum","html_url":"https://github.com/Mark-Simulacrum","followers_url":"https://api.github.com/users/Mark-Simulacrum/followers","following_url":"https://api.github.com/users/Mark-Simulacrum/following{/other_user}","gists_url":"https://api.github.com/users/Mark-Simulacrum/gists{/gist_id}","starred_url":"https://api.github.com/users/Mark-Simulacrum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mark-Simulacrum/subscriptions","organizations_url":"https://api.github.com/users/Mark-Simulacrum/orgs","repos_url":"https://api.github.com/users/Mark-Simulacrum/repos","events_url":"https://api.github.com/users/Mark-Simulacrum/events{/privacy}","received_events_url":"https://api.github.com/users/Mark-Simulacrum/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Mark-Simulacrum/brackets","description":"An open source code editor for the web, written in JavaScript, HTML and CSS.","fork":true,"url":"https://api.github.com/repos/Mark-Simulacrum/brackets","forks_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/forks","keys_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/teams","hooks_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/hooks","issue_events_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/issues/events{/number}","events_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/events","assignees_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/assignees{/user}","branches_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/branches{/branch}","tags_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/tags","blobs_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/statuses/{sha}","languages_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/languages","stargazers_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/stargazers","contributors_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/contributors","subscribers_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/subscribers","subscription_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/subscription","commits_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/issues/comments/{number}","contents_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/contents/{+path}","compare_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/merges","archive_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/downloads","issues_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/issues{/number}","pulls_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/pulls{/number}","milestones_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/milestones{/number}","notifications_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/labels{/name}","releases_url":"https://api.github.com/repos/Mark-Simulacrum/brackets/releases{/id}","created_at":"2014-08-01T00:00:05Z","updated_at":"2014-07-31T22:14:00Z","pushed_at":"2014-10-20T18:29:42Z","git_url":"git://github.com/Mark-Simulacrum/brackets.git","ssh_url":"git@github.com:Mark-Simulacrum/brackets.git","clone_url":"https://github.com/Mark-Simulacrum/brackets.git","svn_url":"https://github.com/Mark-Simulacrum/brackets","homepage":"http://brackets.io","size":71834,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"adobe:master","ref":"master","sha":"bf2ddaf46cf974ed380df44386127ee09d3977a3","user":{"login":"adobe","id":476009,"avatar_url":"https://avatars.githubusercontent.com/u/476009?v=2","gravatar_id":"","url":"https://api.github.com/users/adobe","html_url":"https://github.com/adobe","followers_url":"https://api.github.com/users/adobe/followers","following_url":"https://api.github.com/users/adobe/following{/other_user}","gists_url":"https://api.github.com/users/adobe/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe/subscriptions","organizations_url":"https://api.github.com/users/adobe/orgs","repos_url":"https://api.github.com/users/adobe/repos","events_url":"https://api.github.com/users/adobe/events{/privacy}","received_events_url":"https://api.github.com/users/adobe/received_events","type":"Organization","site_admin":false},"repo":{"id":2935735,"name":"brackets","full_name":"adobe/brackets","owner":{"login":"adobe","id":476009,"avatar_url":"https://avatars.githubusercontent.com/u/476009?v=2","gravatar_id":"","url":"https://api.github.com/users/adobe","html_url":"https://github.com/adobe","followers_url":"https://api.github.com/users/adobe/followers","following_url":"https://api.github.com/users/adobe/following{/other_user}","gists_url":"https://api.github.com/users/adobe/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe/subscriptions","organizations_url":"https://api.github.com/users/adobe/orgs","repos_url":"https://api.github.com/users/adobe/repos","events_url":"https://api.github.com/users/adobe/events{/privacy}","received_events_url":"https://api.github.com/users/adobe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/adobe/brackets","description":"An open source code editor for the web, written in JavaScript, HTML and CSS.","fork":false,"url":"https://api.github.com/repos/adobe/brackets","forks_url":"https://api.github.com/repos/adobe/brackets/forks","keys_url":"https://api.github.com/repos/adobe/brackets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adobe/brackets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adobe/brackets/teams","hooks_url":"https://api.github.com/repos/adobe/brackets/hooks","issue_events_url":"https://api.github.com/repos/adobe/brackets/issues/events{/number}","events_url":"https://api.github.com/repos/adobe/brackets/events","assignees_url":"https://api.github.com/repos/adobe/brackets/assignees{/user}","branches_url":"https://api.github.com/repos/adobe/brackets/branches{/branch}","tags_url":"https://api.github.com/repos/adobe/brackets/tags","blobs_url":"https://api.github.com/repos/adobe/brackets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adobe/brackets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adobe/brackets/git/refs{/sha}","trees_url":"https://api.github.com/repos/adobe/brackets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adobe/brackets/statuses/{sha}","languages_url":"https://api.github.com/repos/adobe/brackets/languages","stargazers_url":"https://api.github.com/repos/adobe/brackets/stargazers","contributors_url":"https://api.github.com/repos/adobe/brackets/contributors","subscribers_url":"https://api.github.com/repos/adobe/brackets/subscribers","subscription_url":"https://api.github.com/repos/adobe/brackets/subscription","commits_url":"https://api.github.com/repos/adobe/brackets/commits{/sha}","git_commits_url":"https://api.github.com/repos/adobe/brackets/git/commits{/sha}","comments_url":"https://api.github.com/repos/adobe/brackets/comments{/number}","issue_comment_url":"https://api.github.com/repos/adobe/brackets/issues/comments/{number}","contents_url":"https://api.github.com/repos/adobe/brackets/contents/{+path}","compare_url":"https://api.github.com/repos/adobe/brackets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adobe/brackets/merges","archive_url":"https://api.github.com/repos/adobe/brackets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adobe/brackets/downloads","issues_url":"https://api.github.com/repos/adobe/brackets/issues{/number}","pulls_url":"https://api.github.com/repos/adobe/brackets/pulls{/number}","milestones_url":"https://api.github.com/repos/adobe/brackets/milestones{/number}","notifications_url":"https://api.github.com/repos/adobe/brackets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adobe/brackets/labels{/name}","releases_url":"https://api.github.com/repos/adobe/brackets/releases{/id}","created_at":"2011-12-07T21:14:40Z","updated_at":"2014-10-20T18:10:46Z","pushed_at":"2014-10-20T18:32:28Z","git_url":"git://github.com/adobe/brackets.git","ssh_url":"git@github.com:adobe/brackets.git","clone_url":"https://github.com/adobe/brackets.git","svn_url":"https://github.com/adobe/brackets","homepage":"http://brackets.io","size":356039,"stargazers_count":18375,"watchers_count":18375,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":3790,"mirror_url":null,"open_issues_count":1010,"forks":3790,"open_issues":1010,"watchers":18375,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/adobe/brackets/pulls/9190"},"html":{"href":"https://github.com/adobe/brackets/pull/9190"},"issue":{"href":"https://api.github.com/repos/adobe/brackets/issues/9190"},"comments":{"href":"https://api.github.com/repos/adobe/brackets/issues/9190/comments"},"review_comments":{"href":"https://api.github.com/repos/adobe/brackets/pulls/9190/comments"},"review_comment":{"href":"https://api.github.com/repos/adobe/brackets/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/adobe/brackets/pulls/9190/commits"},"statuses":{"href":"https://api.github.com/repos/adobe/brackets/statuses/aada324e8e4e9435fb6a333910fff7f262102c4c"}}}}