diff --git a/app/assets/javascripts/app/controllers/_channel/form.js.coffee b/app/assets/javascripts/app/controllers/_channel/form.js.coffee index 203d02ceb..0ff414a4f 100644 --- a/app/assets/javascripts/app/controllers/_channel/form.js.coffee +++ b/app/assets/javascripts/app/controllers/_channel/form.js.coffee @@ -19,6 +19,8 @@ class App.ChannelForm extends App.Controller ) updateParams: -> + quote = (string) -> + string.replace('\'', '\\\'') params = @formParam(@$('.js-params')) paramString = '' for key, value of params @@ -27,5 +29,5 @@ class App.ChannelForm extends App.Controller if value == 'true' || value == 'false' paramString += " #{key}: #{value}" else - paramString += " #{key}: '#{value}'" + paramString += " #{key}: '#{quote(value)}'" @$('.js-modal-params').html(paramString) \ No newline at end of file diff --git a/app/assets/javascripts/app/views/channel/form.jst.eco b/app/assets/javascripts/app/views/channel/form.jst.eco index a51e014b5..2d08ea622 100644 --- a/app/assets/javascripts/app/views/channel/form.jst.eco +++ b/app/assets/javascripts/app/views/channel/form.jst.eco @@ -10,6 +10,36 @@