diff --git a/backbone.js b/backbone.js index 2341c175..b9201a88 100644 --- a/backbone.js +++ b/backbone.js @@ -307,7 +307,7 @@ url : function() { var base = getUrl(this.collection) || this.urlRoot || urlError(); if (this.isNew()) return base; - return base + (base.charAt(base.length - 1) == '/' ? '' : '/') + this.id; + return base + (base.charAt(base.length - 1) == '/' ? '' : '/') + encodeURIComponent(this.id); }, // **parse** converts a response into the hash of attributes to be `set` on