mirror of
https://github.com/jashkenas/backbone.git
synced 2026-01-24 22:37:58 -05:00
encodeURIComponent this.id
in Backbone.Model.prototype.url
This commit is contained in:
committed by
Jeremy Ashkenas
parent
c6d2c69d82
commit
aab49ebded
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user