From aab49ebded7eeb78f12de654e18285cdfd9e7b12 Mon Sep 17 00:00:00 2001 From: "Johannes J. Schmidt" Date: Mon, 31 Jan 2011 17:10:50 +0100 Subject: [PATCH] encodeURIComponent this.id in Backbone.Model.prototype.url --- backbone.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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