lib/assets/javascripts/transponder/response.coffee in transponder-0.9.2 vs lib/assets/javascripts/transponder/response.coffee in transponder-0.9.3
- old
+ new
@@ -2,11 +2,14 @@
payload: {}
constructor: ->
$(document).on 'ajax:complete', (event, xhr, status) =>
if xhr.getResponseHeader('Content-Type') is 'application/transmission'
- @payload.raw = JSON.parse(xhr.responseText)
+ @payload.raw = JSON.parse(@cleanContent(xhr.responseText))
element = @payload.raw[0]
event_name = @payload.raw[1]
content = @payload.raw[2]
$(element).trigger(event_name, content)
+
+ cleanContent: (content) ->
+ content.replace(/'/g, '"');
\ No newline at end of file