lib/carte/client/models/card.coffee in carte-server-0.0.9 vs lib/carte/client/models/card.coffee in carte-server-0.0.10
- old
+ new
@@ -1,7 +1,8 @@
Backbone = require('backbone')
config = require('../../shared/config.json')
+querystring = require('querystring')
module.exports = class Card extends Backbone.Model
idAttribute: 'title'
isNew: ()->
@@ -12,10 +13,10 @@
console.log @
console.log 'url is new'
url = '/api/cards.json'
else
console.log 'url is not new'
- url = '/api/cards/' + @get('title') + '.json'
+ url = '/api/cards/' + encodeURIComponent(@get('title')) + '.json'
if config.api_path
url = config.api_path + url
url
parse: (response)->