{"action":"closed","number":514,"pull_request":{"url":"https://api.github.com/repos/rendrjs/rendr/pulls/514","id":70275563,"html_url":"https://github.com/rendrjs/rendr/pull/514","diff_url":"https://github.com/rendrjs/rendr/pull/514.diff","patch_url":"https://github.com/rendrjs/rendr/pull/514.patch","issue_url":"https://api.github.com/repos/rendrjs/rendr/issues/514","number":514,"state":"closed","locked":false,"title":"URI encode interpolated parameter value","user":{"login":"jmerrifield","id":608480,"avatar_url":"https://avatars.githubusercontent.com/u/608480?v=3","gravatar_id":"","url":"https://api.github.com/users/jmerrifield","html_url":"https://github.com/jmerrifield","followers_url":"https://api.github.com/users/jmerrifield/followers","following_url":"https://api.github.com/users/jmerrifield/following{/other_user}","gists_url":"https://api.github.com/users/jmerrifield/gists{/gist_id}","starred_url":"https://api.github.com/users/jmerrifield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmerrifield/subscriptions","organizations_url":"https://api.github.com/users/jmerrifield/orgs","repos_url":"https://api.github.com/users/jmerrifield/repos","events_url":"https://api.github.com/users/jmerrifield/events{/privacy}","received_events_url":"https://api.github.com/users/jmerrifield/received_events","type":"User","site_admin":false},"body":"It seems like there is a discrepancy with how URL encoding takes place.\r\n\r\nGiven a model `var UserModel = BaseModel.extend({urlRoot: '/users'})`, we can fetch it with a spec `{model: 'UserModel', params: {id: 'президент'}}` and the URL fetched will be `/users/%D0%BF%D1%80%D0%B5%D0%B7%D0%B8%D0%B4%D0%B5%D0%BD%D1%82` thanks to [Backbone's `url` method](http://backbonejs.org/docs/backbone.html#section-90) applying a `encodeURIComponent` to the ID.\r\n\r\nWith a collection `var UserOrderCollection = BaseCollection.extend({url: '/users/:user_id/orders'})` and a fetch spec `{collection: 'UserOrderCollection', params: {user_id: 'президент'}}`, no encoding is applied and so the URL requested is `/users/президент/orders`.\r\n\r\nUpgrading from Node 0.10.30 to a later version has revealed this for us. It seems that newer Node versions might do less automatic escaping of outbound URLs.\r\n\r\nThis PR attempts to give us consistency over the encoding of dynamically constructed URLs.","created_at":"2016-05-16T22:59:02Z","updated_at":"2016-05-19T19:02:19Z","closed_at":"2016-05-19T19:02:19Z","merged_at":"2016-05-19T19:02:19Z","merge_commit_sha":"48560e1ca1ad72c94c9c68fb9cfba3259163536e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rendrjs/rendr/pulls/514/commits","review_comments_url":"https://api.github.com/repos/rendrjs/rendr/pulls/514/comments","review_comment_url":"https://api.github.com/repos/rendrjs/rendr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rendrjs/rendr/issues/514/comments","statuses_url":"https://api.github.com/repos/rendrjs/rendr/statuses/a438105a5169dd6cfac72905a64486c27c97454f","head":{"label":"jmerrifield:encode-interpolated-params","ref":"encode-interpolated-params","sha":"a438105a5169dd6cfac72905a64486c27c97454f","user":{"login":"jmerrifield","id":608480,"avatar_url":"https://avatars.githubusercontent.com/u/608480?v=3","gravatar_id":"","url":"https://api.github.com/users/jmerrifield","html_url":"https://github.com/jmerrifield","followers_url":"https://api.github.com/users/jmerrifield/followers","following_url":"https://api.github.com/users/jmerrifield/following{/other_user}","gists_url":"https://api.github.com/users/jmerrifield/gists{/gist_id}","starred_url":"https://api.github.com/users/jmerrifield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmerrifield/subscriptions","organizations_url":"https://api.github.com/users/jmerrifield/orgs","repos_url":"https://api.github.com/users/jmerrifield/repos","events_url":"https://api.github.com/users/jmerrifield/events{/privacy}","received_events_url":"https://api.github.com/users/jmerrifield/received_events","type":"User","site_admin":false},"repo":{"id":21154701,"name":"rendr","full_name":"jmerrifield/rendr","owner":{"login":"jmerrifield","id":608480,"avatar_url":"https://avatars.githubusercontent.com/u/608480?v=3","gravatar_id":"","url":"https://api.github.com/users/jmerrifield","html_url":"https://github.com/jmerrifield","followers_url":"https://api.github.com/users/jmerrifield/followers","following_url":"https://api.github.com/users/jmerrifield/following{/other_user}","gists_url":"https://api.github.com/users/jmerrifield/gists{/gist_id}","starred_url":"https://api.github.com/users/jmerrifield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmerrifield/subscriptions","organizations_url":"https://api.github.com/users/jmerrifield/orgs","repos_url":"https://api.github.com/users/jmerrifield/repos","events_url":"https://api.github.com/users/jmerrifield/events{/privacy}","received_events_url":"https://api.github.com/users/jmerrifield/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jmerrifield/rendr","description":"Render your Backbone.js apps on the client and the server, using Node.js.","fork":true,"url":"https://api.github.com/repos/jmerrifield/rendr","forks_url":"https://api.github.com/repos/jmerrifield/rendr/forks","keys_url":"https://api.github.com/repos/jmerrifield/rendr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmerrifield/rendr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmerrifield/rendr/teams","hooks_url":"https://api.github.com/repos/jmerrifield/rendr/hooks","issue_events_url":"https://api.github.com/repos/jmerrifield/rendr/issues/events{/number}","events_url":"https://api.github.com/repos/jmerrifield/rendr/events","assignees_url":"https://api.github.com/repos/jmerrifield/rendr/assignees{/user}","branches_url":"https://api.github.com/repos/jmerrifield/rendr/branches{/branch}","tags_url":"https://api.github.com/repos/jmerrifield/rendr/tags","blobs_url":"https://api.github.com/repos/jmerrifield/rendr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmerrifield/rendr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmerrifield/rendr/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmerrifield/rendr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmerrifield/rendr/statuses/{sha}","languages_url":"https://api.github.com/repos/jmerrifield/rendr/languages","stargazers_url":"https://api.github.com/repos/jmerrifield/rendr/stargazers","contributors_url":"https://api.github.com/repos/jmerrifield/rendr/contributors","subscribers_url":"https://api.github.com/repos/jmerrifield/rendr/subscribers","subscription_url":"https://api.github.com/repos/jmerrifield/rendr/subscription","commits_url":"https://api.github.com/repos/jmerrifield/rendr/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmerrifield/rendr/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmerrifield/rendr/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmerrifield/rendr/issues/comments{/number}","contents_url":"https://api.github.com/repos/jmerrifield/rendr/contents/{+path}","compare_url":"https://api.github.com/repos/jmerrifield/rendr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmerrifield/rendr/merges","archive_url":"https://api.github.com/repos/jmerrifield/rendr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmerrifield/rendr/downloads","issues_url":"https://api.github.com/repos/jmerrifield/rendr/issues{/number}","pulls_url":"https://api.github.com/repos/jmerrifield/rendr/pulls{/number}","milestones_url":"https://api.github.com/repos/jmerrifield/rendr/milestones{/number}","notifications_url":"https://api.github.com/repos/jmerrifield/rendr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmerrifield/rendr/labels{/name}","releases_url":"https://api.github.com/repos/jmerrifield/rendr/releases{/id}","deployments_url":"https://api.github.com/repos/jmerrifield/rendr/deployments","created_at":"2014-06-24T06:36:04Z","updated_at":"2016-05-16T22:07:56Z","pushed_at":"2016-05-18T23:35:44Z","git_url":"git://github.com/jmerrifield/rendr.git","ssh_url":"git@github.com:jmerrifield/rendr.git","clone_url":"https://github.com/jmerrifield/rendr.git","svn_url":"https://github.com/jmerrifield/rendr","homepage":"","size":1638,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"rendrjs:master","ref":"master","sha":"827635b189310e6179189a2b531a4b5a252d6179","user":{"login":"rendrjs","id":6723827,"avatar_url":"https://avatars.githubusercontent.com/u/6723827?v=3","gravatar_id":"","url":"https://api.github.com/users/rendrjs","html_url":"https://github.com/rendrjs","followers_url":"https://api.github.com/users/rendrjs/followers","following_url":"https://api.github.com/users/rendrjs/following{/other_user}","gists_url":"https://api.github.com/users/rendrjs/gists{/gist_id}","starred_url":"https://api.github.com/users/rendrjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rendrjs/subscriptions","organizations_url":"https://api.github.com/users/rendrjs/orgs","repos_url":"https://api.github.com/users/rendrjs/repos","events_url":"https://api.github.com/users/rendrjs/events{/privacy}","received_events_url":"https://api.github.com/users/rendrjs/received_events","type":"Organization","site_admin":false},"repo":{"id":6479425,"name":"rendr","full_name":"rendrjs/rendr","owner":{"login":"rendrjs","id":6723827,"avatar_url":"https://avatars.githubusercontent.com/u/6723827?v=3","gravatar_id":"","url":"https://api.github.com/users/rendrjs","html_url":"https://github.com/rendrjs","followers_url":"https://api.github.com/users/rendrjs/followers","following_url":"https://api.github.com/users/rendrjs/following{/other_user}","gists_url":"https://api.github.com/users/rendrjs/gists{/gist_id}","starred_url":"https://api.github.com/users/rendrjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rendrjs/subscriptions","organizations_url":"https://api.github.com/users/rendrjs/orgs","repos_url":"https://api.github.com/users/rendrjs/repos","events_url":"https://api.github.com/users/rendrjs/events{/privacy}","received_events_url":"https://api.github.com/users/rendrjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rendrjs/rendr","description":"Render your Backbone.js apps on the client and the server, using Node.js.","fork":false,"url":"https://api.github.com/repos/rendrjs/rendr","forks_url":"https://api.github.com/repos/rendrjs/rendr/forks","keys_url":"https://api.github.com/repos/rendrjs/rendr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rendrjs/rendr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rendrjs/rendr/teams","hooks_url":"https://api.github.com/repos/rendrjs/rendr/hooks","issue_events_url":"https://api.github.com/repos/rendrjs/rendr/issues/events{/number}","events_url":"https://api.github.com/repos/rendrjs/rendr/events","assignees_url":"https://api.github.com/repos/rendrjs/rendr/assignees{/user}","branches_url":"https://api.github.com/repos/rendrjs/rendr/branches{/branch}","tags_url":"https://api.github.com/repos/rendrjs/rendr/tags","blobs_url":"https://api.github.com/repos/rendrjs/rendr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rendrjs/rendr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rendrjs/rendr/git/refs{/sha}","trees_url":"https://api.github.com/repos/rendrjs/rendr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rendrjs/rendr/statuses/{sha}","languages_url":"https://api.github.com/repos/rendrjs/rendr/languages","stargazers_url":"https://api.github.com/repos/rendrjs/rendr/stargazers","contributors_url":"https://api.github.com/repos/rendrjs/rendr/contributors","subscribers_url":"https://api.github.com/repos/rendrjs/rendr/subscribers","subscription_url":"https://api.github.com/repos/rendrjs/rendr/subscription","commits_url":"https://api.github.com/repos/rendrjs/rendr/commits{/sha}","git_commits_url":"https://api.github.com/repos/rendrjs/rendr/git/commits{/sha}","comments_url":"https://api.github.com/repos/rendrjs/rendr/comments{/number}","issue_comment_url":"https://api.github.com/repos/rendrjs/rendr/issues/comments{/number}","contents_url":"https://api.github.com/repos/rendrjs/rendr/contents/{+path}","compare_url":"https://api.github.com/repos/rendrjs/rendr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rendrjs/rendr/merges","archive_url":"https://api.github.com/repos/rendrjs/rendr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rendrjs/rendr/downloads","issues_url":"https://api.github.com/repos/rendrjs/rendr/issues{/number}","pulls_url":"https://api.github.com/repos/rendrjs/rendr/pulls{/number}","milestones_url":"https://api.github.com/repos/rendrjs/rendr/milestones{/number}","notifications_url":"https://api.github.com/repos/rendrjs/rendr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rendrjs/rendr/labels{/name}","releases_url":"https://api.github.com/repos/rendrjs/rendr/releases{/id}","deployments_url":"https://api.github.com/repos/rendrjs/rendr/deployments","created_at":"2012-10-31T19:24:35Z","updated_at":"2016-05-19T03:55:01Z","pushed_at":"2016-05-19T19:02:19Z","git_url":"git://github.com/rendrjs/rendr.git","ssh_url":"git@github.com:rendrjs/rendr.git","clone_url":"https://github.com/rendrjs/rendr.git","svn_url":"https://github.com/rendrjs/rendr","homepage":"","size":2429,"stargazers_count":4163,"watchers_count":4163,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":337,"mirror_url":null,"open_issues_count":74,"forks":337,"open_issues":74,"watchers":4163,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rendrjs/rendr/pulls/514"},"html":{"href":"https://github.com/rendrjs/rendr/pull/514"},"issue":{"href":"https://api.github.com/repos/rendrjs/rendr/issues/514"},"comments":{"href":"https://api.github.com/repos/rendrjs/rendr/issues/514/comments"},"review_comments":{"href":"https://api.github.com/repos/rendrjs/rendr/pulls/514/comments"},"review_comment":{"href":"https://api.github.com/repos/rendrjs/rendr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rendrjs/rendr/pulls/514/commits"},"statuses":{"href":"https://api.github.com/repos/rendrjs/rendr/statuses/a438105a5169dd6cfac72905a64486c27c97454f"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"saponifi3d","id":1569818,"avatar_url":"https://avatars.githubusercontent.com/u/1569818?v=3","gravatar_id":"","url":"https://api.github.com/users/saponifi3d","html_url":"https://github.com/saponifi3d","followers_url":"https://api.github.com/users/saponifi3d/followers","following_url":"https://api.github.com/users/saponifi3d/following{/other_user}","gists_url":"https://api.github.com/users/saponifi3d/gists{/gist_id}","starred_url":"https://api.github.com/users/saponifi3d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saponifi3d/subscriptions","organizations_url":"https://api.github.com/users/saponifi3d/orgs","repos_url":"https://api.github.com/users/saponifi3d/repos","events_url":"https://api.github.com/users/saponifi3d/events{/privacy}","received_events_url":"https://api.github.com/users/saponifi3d/received_events","type":"User","site_admin":false},"comments":6,"review_comments":0,"commits":2,"additions":37,"deletions":1,"changed_files":2}}